discord-baymax-bot/node_modules/array-find-index
2017-03-23 23:52:08 -05:00
..
index.js Pushing changes 2017-03-23 23:52:08 -05:00
license Pushing changes 2017-03-23 23:52:08 -05:00
package.json Pushing changes 2017-03-23 23:52:08 -05:00
readme.md Pushing changes 2017-03-23 23:52:08 -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