JSPM

npm-array-find

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q14627F
  • License MIT

this npm package help to user find the data from the array in javascript. user can find data with/without object name.

Package Exports

  • npm-array-find

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (npm-array-find) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Installation:

npm i array-find

How to use ?

const findInArray = require('array-find');
or
import findInArray from 'array-find';

// With object name findInArray(arrayData,searchValue,objectName)

findInArray(
    [
      { name: "akash", age: 25 },
      { name: "ravi", age: 28 },
      { name: "rajan", age: 25 },
    ],
    28,
    "age"
);

// Without object name findInArray(arrayData,searchValue)

findInArray([1, 2, 3, 4, 5], 1);

Array filter

for array filter visit: https://www.npmjs.com/package/npm-array-filter