UNPKG

rambda

Version:

Lightweight faster alternative to Ramda

12 lines (9 loc) 180 B
import { curry } from './curry' function assocFn( prop, newValue, obj ){ return Object.assign( {}, obj, { [ prop ] : newValue } ) } export const assoc = curry(assocFn)