mariocasciaro / object-path-immutable

Modify deep object properties without modifying the original object (immutability). Works great with React and Redux.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add update method

dobryanskyy opened this issue · comments

Wouldn't it be nice to have also update method which would look the following way:

immutable.set(obj, objectPath, oldValue => newValue)

in many cases next value of some property is calculated based on the current value.