sf-promise-gateway
v0.9.0
Published
Soundfile.io Promise Batch Processing Gateway
Downloads
3
Readme
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) => {
});