grep-from-array
v0.9.0
Published
Pass an array and generate a new one with only values matching conditions
Downloads
21
Maintainers
Readme
grep-from-array
Node module which you can pass an array, and generate a new array containing only values that match a given condition.
Installation
$ npm install --save grep-from-array
Example
var r = grep([1, 100, 50, 30, 5, -5, 0, 20], function (val) {
return val > 20;
});
console.log(r); // [ 100, 50, 30 ]