I hereby claim:
- I am belaczek on github.
- I am belaczek (https://keybase.io/belaczek) on keybase.
- I have a public key whose fingerprint is 1736 65CE 876D 43A1 E415 3A67 1EDD F060 29C4 A3A6
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* Async map function with currying support | |
* @param fn | |
* @param arr | |
* @return {function(*=)} | |
*/ | |
export const asyncMap = (fn, arr) => { | |
const asyncMapHelper = async arr => { | |
const promiseArray = Array.prototype.map.call(arr, async x => fn(x)); | |
return await Promise.all(promiseArray); |