array-find-index

ES2015 `Array#findIndex()` ponyfill

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
array-find-index
3101.0.26 years ago7 years agoMinified + gzip package size for array-find-index in KB

Readme

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