Skip to content

remove$

Subhajit Sahu edited this page Jun 12, 2020 · 11 revisions

Deletes an entry. 🏃 [:vhs:] 📦 🌔 📒

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

object.remove$(x, k);
// x: an object (updated)
// k: key
// --> x
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 }

references

Clone this wiki locally