UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

16 lines (14 loc) 262 B
export function mapFn( fn, list ){ let index = 0 const willReturn = Array(list.length) while (index < list.length) { willReturn[index] = fn(list[index], index) index++ } return willReturn } export function map(fn) { return list => mapFn(fn, list) }