Wondering what’s next for npm?Check out our public roadmap! »

array-find-index

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

Install

npm i array-find-index

DownloadsWeekly Downloads

7,697,048

Version

1.0.2

License

MIT

Last publish

Collaborators

  • avatar