Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

find_el_in_array

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find_el_in_array

This package for search an element in array

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Find Element In Array Build Status npm version

search in array

Getting Started

This is an npm package for search in array

Prerequisites

you should have node.js in your local machine

Installing

    npm i find_el_in_array
    
    //OR

    yarn add find_el_in_array

How To Use it

After install package

  1. Examples for simple array:

const FindElementInArray = require('find_el_in_array');

//OR

import FindElementInArray from 'find_el_in_array';


const findElementInArray = new FindElementInArray();

//simple array
    const testArray = [
      'milad', 'ezzat', 'fahmy', 1, 5, 8,
    ];
    const searchItem = 8;

const result = findElementInArray.searchInSimpleArray(testArray, searchItem);
// return 8

// complex array

  const testArray = [
    { id: 1, name: 'milad', age: 24 },
    { id: 2, name: 'ezzat', age: 24 },
    { id: 4, name: 'Milad', age: 24 },
    { id: 3, name: 'Fahym', age: 24 },
  ];
const result = searchInArray.searchInComplexArray(testArray, 'id', 4);
// return { id: 4, name: 'Milad', age: 24 }

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Keywords

FAQs

Package last updated on 21 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc