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
Evaluate how different ES6 generator runners (Q, Bluebird and Co) behaves with buggy code
NodeJS v5.6.0
q@1.4.1
bluebird@3.3.1
co@4.6.0
varQ=require('q');varbluebird=require('bluebird');varco=require('co');// Offtopic. Generator fn as a solution to lazy collection as iterablesfunction*items(){yield1;yield2;yield3;}// Generator fn as a solution to async function compositionfunction*sum(){varx=yieldPromise.resolve(1);vary=yieldPromise.resolve(2);varz=yieldPromise.resolve(3);returnx+y+z;}function*f(){varx=yield*sum();console.log('x ==',x);}Q.spawn(f);bluebird.coroutine(f)();co(f);