Bachir Soussi Chiadmi 0611418f7a added whole system from ola4doc | %!s(int64=7) %!d(string=hai) anos | |
---|---|---|
.. | ||
index.js | %!s(int64=7) %!d(string=hai) anos | |
license | %!s(int64=7) %!d(string=hai) anos | |
package.json | %!s(int64=7) %!d(string=hai) anos | |
readme.md | %!s(int64=7) %!d(string=hai) anos |
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