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
- Host: GitHub
- URL: https://github.com/knowledgecode/array.js
- Owner: knowledgecode
- License: mit
- Created: 2013-01-05T04:04:44.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-05T04:06:51.000Z (almost 13 years ago)
- Last Synced: 2025-01-30T19:52:28.601Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.