@weekendesk/asyncflow
v1.1.1
Published
This library allow you to use flows, or sometimes named waterfalls, on an easy way.
Downloads
8
Maintainers
Readme
Asyncflow •
This library allow you to use flows, or sometimes named waterfalls, on an easy way.
const asyncflow = require('./index');
const square = (value) => value * value;
const asyncSquare = (value) => new Promise((resolve) => {
setTimeout(() => { resolve(value * value); });
});
const result = asyncflow([
square,
asyncSquare,
])(2);
// OR
const result = asyncflow(
square,
asyncSquare,
)(2);
License
Copyright (c) Weekendesk SAS.