UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

10 lines (9 loc) 172 B
export function createObjectFromKeys(fn) { return keys => { const result = {} keys.forEach((key, index) => { result[key] = fn(key, index) }) return result } }