# array-index-of

> [![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][coveralls-image]][coveralls-url]

Latest version **0.1.0** (published 2015-10-29) · 0 weekly downloads

## Install

```sh
npm install array-index-of
pnpm add array-index-of
yarn add array-index-of
bun add array-index-of
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-10-29 |
| First published | 2015-10-29 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | luckydrq |
| Maintainers | luckydrq |
| Keywords | array, indexOf |

## Links

- npm: https://www.npmjs.com/package/array-index-of
- Repository: https://github.com/luckydrq/array-index-of
- Homepage: https://github.com/luckydrq/array-index-of#readme
- Issues: https://github.com/luckydrq/array-index-of/issues
- npm.io page: https://npm.io/package/array-index-of

## Recent versions

- 0.1.0 (latest) — 2015-10-29

## README

# array-index-of
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]

More powerful version of Array.prototype.indexOf

## Install
`$ npm install array-index-of`

## Example
```js
var indexOf = require('array-index-of');
var index = indexOf([1, 2, 3], 2);  // 1
var index2 = indexOf([{a: 1}, {a: 2}], {a: 2}, function(inArr, target) {
  return inArr.a === target.a;
});  // 1

// or you can override #indexOf of an Array object
var override = require('array-index-of').override;
var arr = override([1, 2]);
var index = arr.indexOf(2, function(a, b) { return (a + 1) === b; });
console.log(index); // 0
```

## Lisence
MIT

[npm-image]: https://img.shields.io/npm/v/array-index-of.svg?style=flat-square
[npm-url]: https://npmjs.org/package/array-index-of
[travis-image]: https://img.shields.io/travis/luckydrq/array-index-of/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/luckydrq/array-index-of
[coveralls-image]: https://img.shields.io/coveralls/luckydrq/array-index-of/master.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/luckydrq/array-index-of?branch=master

---
_Source: https://npm.io/package/array-index-of · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
