Skip to content

rejectAt

Subhajit Sahu edited this page Jun 18, 2020 · 16 revisions

Gets lists without given keys. 🏃 📼 📦 🌔 📒

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

lists.rejectAt(x, ks);
// x:  lists
// ks: keys
const entries = require('extra-lists');

var x = [['a', 1], ['b', 2], ['c', 3], ['d', 4], ['e', 5]];
[...entries.rejectAt(x, ['a', 'c', 'e'])];
// [ [ 'b', 2 ], [ 'd', 4 ] ]

[...entries.rejectAt(x, ['b', 'd'])];
// [ [ 'a', 1 ], [ 'c', 3 ], [ 'e', 5 ] ]

references

Clone this wiki locally