UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

12 lines (10 loc) 199 B
export function mapAsync(fn) { return async list => { const willReturn = [] let i = 0 for (const x of list) { willReturn.push(await fn(x, i++)) } return willReturn } }