proq

1.0.0 • Public • Published

proq

npm license github-issues travis-status coveralls commitizen friendly

Promise Sequence Module.

Terse and simple promise sequences for thouse who don't want to reinvent the wheel like i did 🚀 🐳 💥.

Install

npm i proq
npm i --save proq // to put it into your package.json

Usage

import proq from 'proq';
 
function magic1(params) {
  // make some magic here ...
  return new Promise(resolve => resolve(/* some result of our magic above */));
}
 
/* params is result of magic from magic1 */
function magic2(params) {
  // more magic here ...
  return new Promise(resolve => resolve(/* some result of our magic2 */));
}
 
proq([magic1, magic2], { unicorns: 10 } /* initial params */)
  .then(resultOfAllMagic => console.log(resultOfAllMagic));
 

Functions magic1 and magic2 will be called sequentially and result of each one will be passed to next one.

Author

Stanislav Sysoev d4rkr00t@gmail.com https://github.com/d4rkr00t

License

Contributing

Contributing are highly welcome! This repos is commitizen friendly — please read about it here.

Readme

Keywords

Package Sidebar

Install

npm i proq

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • sysoev