|
||||
---|---|---|---|---|
.. | ||||
index.js | 11e3a9652a | 7 jaren geleden | ||
license | 11e3a9652a | 7 jaren geleden | ||
package.json | 11e3a9652a | 7 jaren geleden | ||
readme.md | 11e3a9652a | 7 jaren geleden |
ES2015
Array#findIndex()
ponyfill
$ npm install --save array-find-index
const arrayFindIndex = require('array-find-index');
arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn');
//=> 1
Same as Array#findIndex()
, but with the input array as the first argument.
MIT © Sindre Sorhus