Socket
Socket
Sign inDemoInstall

find-index

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    find-index

finds an item in an array matching a predicate function, and returns its index


Version published
Maintainers
1
Install size
3.32 kB
Created

Readme

Source

find-indexof

finds an item in an array matching a predicate function, and returns its index

fast both when thisArg is used and also when it isn't: jsPerf

usage

npm install find-indexof
findIndexOf = require('find-indexof')
findLastIndexOf = require('find-indexof/last')
findIndexOf(array, callback[, thisArg])
findLastIndexOf(array, callback[, thisArg])
Parameters:
  array
    The array to operate on.
  callback
    Function to execute on each value in the array, taking three arguments:
      element
        The current element being processed in the array.
      index
        The index of the current element being processed in the array.
      array
        The array findIndex was called upon.
  thisArg
    Object to use as this when executing callback.

based on array-findindex

Keywords

FAQs

Last updated on 29 Jun 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc