1
0
Derivar 0
polybius.fyi/reveal.js/node_modules/array-find-index
2017-10-18 15:31:01 +02:00
..
index.js presentations 2017-10-18 15:31:01 +02:00
license presentations 2017-10-18 15:31:01 +02:00
package.json presentations 2017-10-18 15:31:01 +02:00
readme.md presentations 2017-10-18 15:31:01 +02: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