0.2.2 • Published 3 years ago

@delonnewman/conveyor v0.2.2

Weekly downloads
3
License
ISC
Repository
github
Last release
3 years ago

Node.js CI npm dependencies Status devDependencies Status

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

Annotated Source

Conveyor.js

See Also