1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/find-index
詹力 1a19ec897f 删除无关模块 2024-01-16 21:26:16 +08:00
..
README.md i4 2023-12-18 13:12:25 +08:00
index.js i4 2023-12-18 13:12:25 +08:00
last.js i4 2023-12-18 13:12:25 +08:00
package.json 删除无关模块 2024-01-16 21:26:16 +08:00

README.md

find-index

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-index
findIndex = require('find-index')
findLastIndex = require('find-index/last')
findIndex(array, callback[, thisArg])
findLastIndex(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