0.2.2 • Published 3 years ago
@delonnewman/conveyor v0.2.2
Conveyor.js
Buffered and coordinated IO.
Synopsis
var io = conveyor();
function addItemToPage(item) {
return function() {
// DOM interactions
};
}
function saveItemtoDatabase(item) {
return function() {
return Promise...;
};
}
function handleServiceError(resultFromPromise) {
// error handling
}
function doAddTodoItem(item) {
io.do(
addItemToPage(item),
saveItemToDatabase(item),
handleServiceError
);
}
Install
> npm install @delonnewman/conveyor