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
I find myself doing the following over and over again:
var items = [1,2,3,4]; // some array
var itemsP = items.map(function(item){
// do some blocking operation with item which returns a promise
return item;
});
return q.all(itemsP);
Maybe it makes sense do define a function Q.each or Q.map as follows
I think the API surface is pretty frozen at this point, but you can either use a library with these helpers like https://github.com/petkaantonov/bluebird or implement them yourself (like you did above)
I find myself doing the following over and over again:
Maybe it makes sense do define a function
Q.each
orQ.map
as followsThe text was updated successfully, but these errors were encountered: