I hereby claim:
- I am maartenbusstra on github.
- I am maartenbusstra (https://keybase.io/maartenbusstra) on keybase.
- I have a public key whose fingerprint is DE19 14FD E115 1C11 C080 D5F9 99DD 44BE 8431 FE3B
To claim this, I am signing this object:
const batchedMap = batchSize => data => async (fn) => { | |
const batches = data.length / batchSize; | |
let result = []; | |
for (let i = 0; i < batches; i++) { | |
const res = await Promise.all(data | |
.slice(i * batchSize, (i + 1) * batchSize) | |
.map((d, j) => fn(d, (i * batchSize) + j)), | |
); | |
result = result.concat(res); | |
} |
I hereby claim:
To claim this, I am signing this object: