Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gamtiq/array-indexof-shim

Shim for ECMAScript 5 Array.prototype.indexOf
https://github.com/gamtiq/array-indexof-shim

Last synced: about 7 hours ago
JSON representation

Shim for ECMAScript 5 Array.prototype.indexOf

Awesome Lists containing this project

README

        

# array-indexof-shim

Shim for ECMAScript 5 Array.prototype.indexOf.
Based on [source from Mozilla](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf).

## Installation

Via [Component](https://github.com/componentjs/component):

component install gamtiq/array-indexof-shim

## Usage

```js
var indexOf = require("array-indexof-shim");
...
var nIndex1 = someArray.indexOf(someValue1, nStartIndex);
var nIndex2 = indexOf.call(someArray, someValue2);
```

## Licence

MIT