removeIn()

Returns a copy of the collection with the value at the key path removed.

removeIn<C>(collection: C, keyPath: Iterable<unknown>): C

Discussion

A functional alternative to collection.removeIn(keypath) which will also work with plain Objects and Arrays.

const { removeIn } = require('immutable')
const original = { x: { y: { z: 123 }}}
removeIn(original, ['x', 'y', 'z']) // { x: { y: {}}}
console.log(original) // { x: { y: { z: 123 }}}run it
This documentation is generated from immutable.d.ts. Pull requests and Issues welcome.

© 2014–present, Lee Byron and other contributors
Licensed under the 3-clause BSD License.
https://immutable-js.com/docs/v4.0.0/removeIn()/