UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

7 lines (5 loc) 197 B
import { mapObject } from './mapObject.js' import { type } from './type.js' export function evolve(rules) { return mapObject((x, prop) => type(rules[prop]) === 'Function' ? rules[prop](x): x) }