array-find-index
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/array-find-index package

1.0.2 • Public • Published

array-find-index Build Status

ES2015 Array#findIndex() ponyfill

Install

$ npm install --save array-find-index

Usage

const arrayFindIndex = require('array-find-index');
 
arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn');
//=> 1

API

Same as Array#findIndex(), but with the input array as the first argument.

License

MIT © Sindre Sorhus

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    5,141,311
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    5,141,311
  • 1.0.1
    5,061
  • 1.0.0
    0

Package Sidebar

Install

npm i array-find-index

Weekly Downloads

5,146,372

Version

1.0.2

License

MIT

Last publish

Collaborators

  • sindresorhus