Skip to content
Subhajit Sahu edited this page Dec 8, 2022 · 11 revisions

Remove an entry from object.

Alternatives: remove, remove$.
Similar: remove, removePath$.
Similar: get, set, swap, remove.


function remove(x, k)
// x: an object
// k: key
const object = require('extra-object');

var x = {a: 2, b: 4, c: 6, d: 8};
object.remove(x, 'b');
// → { a: 2, c: 6, d: 8 }

object.remove(x, 'd');
// → { a: 2, b: 4, c: 6 }


References

Clone this wiki locally