object-path-immutable
object-path-immutable copied to clipboard
del over nonexistent path will create every step except the last that purports to delete
An example is this:
import immutable from 'object-path-immutable';
const obj = { foo: { bar: true } };
const newObj = immutable.del(obj, 'foo.rab.oof');
What one gets is
{ foo: { bar: true, rab: { } }
The expected behavior is
{ foo: { bar: true } }
I confirm...