npm-array-filter
v1.0.9
Published
this npm package help to user filter the data from the array in javascript. user can filter data with/without object name.
Downloads
12
Maintainers
Readme
Installation:
npm i npm-array-filter
How to use ?
const filterArray = require('npm-array-filter');
or
import filterArray from 'npm-array-filter';
// With object name filterArray(arrayData,searchValue,objectName)
filterArray(
[
{ name: "akash", age: 25 },
{ name: "ravi", age: 28 },
{ name: "rajan", age: 25 },
],
28,
"age"
);
// Without object name filterArray(arrayData,searchValue)
filterArray([1, 2, 3, 4, 5], 1);