0.9.0 • Published 7 years ago

sf-promise-gateway v0.9.0

Weekly downloads
3
License
GPL-3.0
Repository
github
Last release
7 years ago

sf-promise-gateway

About

This is a simple batch processing gateway that returns a promise, simple solver of complex promise batch problems.

Usage

const gateway = require('sf-promise-gateway');
const items = [ "a", "b", "c"];

gateway(items, (item, next) => {
  const onSuccess = (result) => {
    next(null, result);
  };

  const onError = (error) => {
    next(error);
  };

  somethingAsync(onSuccess, onError);
})
.then((results) => {

});