npm.io
1.0.2 • Published 9 years ago

array-find-index

Licence
MIT
Version
1.0.2
Deps
0
Vulns
0
Weekly
0
Stars
33

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

Keywords