You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eugene Lazutkin edited this page Mar 16, 2016
·
5 revisions
This module provides functionality by instrumenting async.generic.seq with Promise. It returns either a function, or null, if Promise is not available on user's platform.
Simple example with synchronous functions:
varseq=require('heya-async/seq');varchain=seq([function(value){returnvalue+1;},function(value){return2*value;},function(value){returnvalue/10;}]);chain.end.then(function(value){console.log('Should be 5:',value);returnvalue;});chain.resolve(24);// start the chain