blend / promise-utils

Lodash-like, dependency-free utilities for native ES6 promises.
MIT License
282 stars 15 forks source link

Add new mapLimitWithArgs function #97

Closed gaestradaaedo closed 6 months ago

gaestradaaedo commented 6 months ago

Added new function called mapLimitWithArgs. This function has a similar behaviour as the mapLimit function, but it enables the user to send any number of arguments that will be used inside the given iteratee promise.

This allows the iteratee promise function to not only process the entries of the input array but to add additional behaviours inside of it, depending on the logic of the promise. An example of this would be that the input array is a list of notifications to send to the user and one of the additional arguments is the id of the user for additional validations or the notification's content treatment.