object-path-immutable icon indicating copy to clipboard operation
object-path-immutable copied to clipboard

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

Results 20 object-path-immutable issues
Sort by recently updated
recently updated
newest added

Given this object: ```json { "body": "{}", "headers": { "access-control-allow-origin": undefined, "content-type": "application/json; charset=utf-8", }, "statusCode": 200 } ``` I would like to do: ```js const allowCORS = false; immutable(obj)...

``` const immutable = require('object-path-immutable') const x = {} console.log(immutable.set(x,'arr.5', 'hello')) ``` returns ```{ arr: [ , 'hello' ] }``` Which leads to different bugs, for example `x.arr.map` will iterate...

I'm not sure if this is a bug or if I'm misunderstanding how this is supposed to work. I assumed in the following example `one` and `two` would be the...

bug
enhancement
help wanted

`immutable(object, 'path.to.slice')` ```javascript const obj = { a: { b: 's1', c: 1 } } immutable(obj, 'a') .set('b', 's3') .update('c', (v) => v+1) .value() /* returns { a: { b:...

enhancement

It would be helpful to either be able to get a copy of the next immutable state, or at least fetch what the next values will be... This would be...

I'd like to update a value inside a deeply nested array (inside an immutable object), but that doesn't seem to work. keyPath usually is somewhere along the lines of "data.common.languages.0.raw":...

As requested :) This might just be a conflict with seamless-immutable I had - i prefer the dot-syntax, which is why I used your library. It might also be an...

Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. Release notes Sourced from json5's releases. v1.0.2 Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a...

dependencies

Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. Changelog Sourced from qs's changelog. 6.5.3 [Fix] parse: ignore __proto__ keys (#428) [Fix] utils.merge`: avoid a crash with a null target and a truthy...

dependencies

[Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) keys are currently lost when cloning objects in [`_changeImmutable`](https://github.com/mariocasciaro/object-path-immutable/blob/024b0e02367191065ba5cde0c2730d8cc4a8c86f/src/object-path-immutable.js#L96). It should be possible to add support by substituting [`for...in`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) with [`Reflect.ownKeys`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/ownKeys). This would be a breaking change in terms...