-
Notifications
You must be signed in to change notification settings - Fork 3
filterAt
Subhajit Sahu edited this page Dec 8, 2022
·
12 revisions
Get object with given keys.
Alternatives: filterAt, filterAt$.
Similar: filter, filterAt.
Similar: map, reduce, filter, reject.
function filterAt(x, ks)
// x: an object
// ks: keys
const object = require('extra-object');
var x = {a: 1, b: 2, c: 3, d: 4, e: 5};
object.filterAt(x, ['a', 'c', 'e']);
// → { a: 1, c: 3, e: 5 }
object.filterAt(x, ['b', 'd']);
// → { b: 2, d: 4 }
- Data.List.filter: Haskell
- Array.prototype.filter: MDN web docs
- array_filter: PHP
- _.remove: lodash
- _.without: lodash
- _.compact: lodash
- _.pull: lodash
- _.pullAll: lodash
- _.pullAllBy: lodash
- _.pullAllWith: lodash
- Array.filter: sugarjs
- Array.exclude: sugarjs
- Array.compact: sugarjs
- array-tools.where: @75lb