UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

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