Bachir Soussi Chiadmi cefd1c2ad0 updated sys and created publi | %!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