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
{{ message }}
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
What's the proper way to get a Q from this CDN version of this library? This example works in the browser, but it looks like the delay doesn't? https://jsfiddle.net/dzzas97p/6/
Its funny, because the equivalent works as expected in Node
// async_series.js// example of using reduce and promises and closure to create async results in seriesvarq=require('Q');varresults=[1,2,3,4,5];functionworkCollection(arr){returnarr.reduce(function(promise,item,index){returnpromise.delay(1000).then(function(result){console.log('item',item,'result',result,'index',index);returntrue;});},q(true));}q().then(function(){console.log('start');returnresults}).then(workCollection).then(function(){console.log('done');},function(err){console.error(err);});
Perhaps my fiddle implementation is not equivalent?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What's the proper way to get a Q from this CDN version of this library? This example works in the browser, but it looks like the delay doesn't? https://jsfiddle.net/dzzas97p/6/
Its funny, because the equivalent works as expected in Node
Perhaps my fiddle implementation is not equivalent?
The text was updated successfully, but these errors were encountered: