Skip to content

rejectAt

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

Gets lists without given keys. 🏃 📼 📦 🌔 📒

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

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

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

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

references

Clone this wiki locally