Skip to content

rejectAt$

Subhajit Sahu edited this page Dec 8, 2022 · 12 revisions

Get object without given keys.

Alternatives: rejectAt, rejectAt$.
Similar: reject, rejectAt.
Similar: map, reduce, filter, reject.


function rejectAt$(x, ks)
// x:  an object (updated)
// ks: keys
const object = require('extra-object');

var x = {a: 1, b: 2, c: 3, d: 4, e: 5};
object.rejectAt$(x, ['a', 'c', 'e']);
// → { b: 2, d: 4 }

x;
// → { b: 2, d: 4 }

var x = {a: 1, b: 2, c: 3, d: 4, e: 5};
object.rejectAt$(x, ['b', 'd']);
// → { a: 1, c: 3, e: 5 }


References

Clone this wiki locally