You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 686B

123456789101112131415161718192021222324252627282930
  1. # array-find-index [![Build Status](https://travis-ci.org/sindresorhus/array-find-index.svg?branch=master)](https://travis-ci.org/sindresorhus/array-find-index)
  2. > ES2015 [`Array#findIndex()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) [ponyfill](https://ponyfill.com)
  3. ## Install
  4. ```
  5. $ npm install --save array-find-index
  6. ```
  7. ## Usage
  8. ```js
  9. const arrayFindIndex = require('array-find-index');
  10. arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn');
  11. //=> 1
  12. ```
  13. ## API
  14. Same as `Array#findIndex()`, but with the input array as the first argument.
  15. ## License
  16. MIT © [Sindre Sorhus](https://sindresorhus.com)