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

https://github.com/knowledgecode/array.js

fallback functions of array for legacy browsers
https://github.com/knowledgecode/array.js

Last synced: 9 months ago
JSON representation

fallback functions of array for legacy browsers

Awesome Lists containing this project

README

          

# Array.js
Array.js adds fallback functions of array for legacy browsers. (ex. IE6-8)
You'll be able to use array functions that has been introduced in ECMA-262 5th Edition in those browsers.

## Methods
### [Array.isArray](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/isArray)
Return true if a variable is an array, if not false.

### [indexOf](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf)
Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.

### [lastIndexOf](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/lastIndexOf)
Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.

### [forEach](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach)
Calls a function for each element in the array.

### [every](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/every)
Returns true if every element in this array satisfies the provided testing function.

### [some](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/some)
Returns true if at least one element in this array satisfies the provided testing function.

### [filter](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/filter)
Creates a new array with all of the elements of this array for which the provided filtering function returns true.

### [map](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/map)
Creates a new array with the results of calling a provided function on every element in this array.

### [reduce](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/Reduce)
Apply a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value.

### [reduceRight](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/ReduceRight)
Apply a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value.

## License
Array.js is available under the terms of the MIT license.