0.0.2 • Published 7 years ago

pco v0.0.2

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

pco

Shortcuts for Bluebird's Promise.coroutine

Example

const P = require('pco');

const f = P.co(function* () {
  yield P.delay(2000);
  return 10;
});

f().then(console.log);

Or:

const { P, co } = require('pco');

const f = co(function* () {
  yield P.delay(2000);
  return 'pco';
});

f().then(console.log);

TODO

Add better docs