3 ms·
Bluebird has this built in. For a quick userscript where I needed something similar, I created this which works ( warning: no unit tests, but it works for me )
by dcherman 11y ago
Bluebird has this built in. For a quick userscript where I needed something similar, I created this which works ( warning: no unit tests, but it works for me )
https://gist.github.com/dcherman/4dfba0d72c008ee5b59d https://gist.github.com/dcherman/4dfba0d72c008ee5b59d
It's a reduce function, but it could work as a forEach as well.