legendary-doc-site/apps/core/assets/node_modules/array-find-index
2020-07-03 21:41:01 -05:00
..
index.js chore: Convert to umbrella app 2020-07-03 21:41:01 -05:00
license chore: Convert to umbrella app 2020-07-03 21:41:01 -05:00
package.json chore: Convert to umbrella app 2020-07-03 21:41:01 -05:00
readme.md chore: Convert to umbrella app 2020-07-03 21:41:01 -05:00

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