ES2015 `Array#findIndex()` ponyfill
Switch branches/tags
Nothing to show
Clone or download
Latest commit 983f4c8 Sep 30, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig 💄 (#3) Apr 27, 2016
.gitattributes init Dec 29, 2015
.gitignore init Dec 29, 2015
.travis.yml 💄 (#3) Apr 27, 2016
index.js Throw on invalid predicate even if array is empty Dec 29, 2015
license init Dec 29, 2015
package.json 1.0.2 Sep 30, 2016
readme.md link to ponyfill.com Sep 30, 2016
test.js fix XO lint issue Jun 16, 2016

readme.md

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