1.1.1 • Published 2 years ago

@weekendesk/asyncflow v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

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