ShenNong_Simple/packages/字体精简工具/node_modules/array-find-index
2024-10-30 15:28:42 +08:00
..
index.js 神农简化版 2024-10-30 15:28:42 +08:00
license 神农简化版 2024-10-30 15:28:42 +08:00
package.json 神农简化版 2024-10-30 15:28:42 +08:00
readme.md 神农简化版 2024-10-30 15:28:42 +08:00

array-find-index Build Status

ES2015 Array#findIndex() ponyfill

Install

$ npm install --save array-find-index

Usage

const arrayFindIndex = require('array-find-index');

arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn');
//=> 1

API

Same as Array#findIndex(), but with the input array as the first argument.

License

MIT © Sindre Sorhus