UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

12 lines (9 loc) 184 B
export function mapKeys(fn) { return obj => { const willReturn = {} Object.keys(obj).forEach(key => { willReturn[fn(key, obj[key])] = obj[key] }) return willReturn } }