@extra-array/filter-at.min
v2.10.19
Published
Keeps values at given indices only.
Downloads
53
Maintainers
Readme
Keeps values at given indices only. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
Alternatives: filter, filter$, filterAt. Similar: map, filter, reject, reduce, accumulate.
This is part of package extra-array.
This is browserified, minified version of @extra-array/filter-at. It is exported as global variable array_filterAt. CDN: unpkg, jsDelivr.
array.filterAt(x, is);
// x: an array (updated)
// is: indices (sorted)
// → x
const array = require("extra-array");
var x = [2, 4, 6, 8];
array.filterAt(x, [1, 2]);
// [ 4, 6 ]
array.filterAt(x, [1, 3]);
// [ 4, 8 ]