-
Notifications
You must be signed in to change notification settings - Fork 3
remove$
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 (updated)
// 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 }
x;
// → { a: 2, c: 6, d: 8 }
var x = {a: 2, b: 4, c: 6, d: 8};
object.remove$(x, 'd');
// → { a: 2, b: 4, c: 6 }