asyncx
v0.4.5
Published
TBA
Downloads
54
Readme
AsyncX
TBA
Installation
npm install asyncx
Usage
var asyncx = require('asyncx');
var Promise = require('bluebird');
var async = asyncx.async, until = asyncx.until;
var afn = async(function* () {
yield until(Promise.delay(1000));
yield until(setTimeout(asyncx.resume, 1000));
return 'done!';
});
afn().then(console.log); // outputs 'done!' after two seconds
Development
Build
npm run build
Run Tests
npm test