@weekendesk/asyncflow

1.1.1 • Public • Published

Asyncflow • CircleCI

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.

MIT

Package Sidebar

Install

npm i @weekendesk/asyncflow

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

3.18 kB

Total Files

4

Last publish

Collaborators

  • shudrum