Tuesday, 25 April 2017

Is Promise.mapSeries the correct way to use array.forEach with promise?

I have to use a lot of array.forEach in my application and I recently stumbled upon Bluebird's Promise.mapSeries feature. (I understand that using 'for' instead of forEach is more efficient, I do that too, if the number of items is large).

I am in love with Promise.mapSeries and think this is the easiest and most efficient way to implement promise while operating on an series of items.

Is there any gotchas and obvious downside in using Promise.mapSeries ?



via Anand

No comments:

Post a Comment