chuwanghui 6d115466a5 electron库 | %!s(int64=6) %!d(string=hai) anos | |
---|---|---|
.. | ||
index.js | %!s(int64=6) %!d(string=hai) anos | |
license | %!s(int64=6) %!d(string=hai) anos | |
package.json | %!s(int64=6) %!d(string=hai) anos | |
readme.md | %!s(int64=6) %!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