christian 4571a14169 android fix | 4 vuotta sitten | |
---|---|---|
.. | ||
index.js | 4 vuotta sitten | |
license | 4 vuotta sitten | |
package.json | 4 vuotta sitten | |
readme.md | 4 vuotta sitten |
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