immutability-helper-x
The library extends the kolodny/immutability-helper to support update by path string, like the get/set in lodash.
install
npm install -S immutability-helper-x
usage
; const data = a: b: c: 1 d: 2 e: 3 2 1 f: 4; // 1. if you want to update the value of data.a.b, you canupdate;// orupdate; // 2. other methods like push and apply in original update libupdate;update; // 3. extend method// step 1update;// step 2update;// or; // 4. update multiple values at the same time in a chainconst d = value;