Bachir Soussi Chiadmi cefd1c2ad0 updated sys and created publi | 7 år sedan | |
---|---|---|
.. | ||
index.js | 7 år sedan | |
license | 7 år sedan | |
package.json | 7 år sedan | |
readme.md | 7 år sedan |
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