Array
Extensions to the native JavaScript Array class.
Credits
Partially based on MooTools, My Object Oriented Javascript Tools. Copyright © 2006-2007 Valerio Proietti, http://mad4milk.net, MIT Style License. Partially based on Prototype JavaScript framework, version 1.6.0 © 2005-2007 Sam Stephenson. Prototype is freely distributable under the terms of an MIT-style license. For details, see the Prototype web site: http://www.prototypejs.org/
| Array | Extensions to the native JavaScript Array class. |
| Functions | |
| forEach | Executes a provided function once per array element. |
| filter | Creates a new array with all elements that pass the test implemented by the provided function. |
| map | Creates a new array with the results of calling a provided function on every element in this array. |
| every | Tests whether all elements in the array pass the test implemented by the provided function. |
| some | Tests whether some element in the array passes the test implemented by the provided function. |
| indexOf | Returns the first index at which a given element can be found in the array, or -1 if it is not present. |
| normalize | Not documented |
| equals | Test wether the array equals to the one passed as parameter. |
| detect | Not documented |
forEach
forEach: function( fn, bind )
Executes a provided function once per array element.
Notes
Javascript 1.6 method
See also
http://developer.mozilla.org
filter
filter: function( fn, bind )
Creates a new array with all elements that pass the test implemented by the provided function.
Notes
Javascript 1.6 method
See also
http://developer.mozilla.org
map
map: function( fn, bind )
Creates a new array with the results of calling a provided function on every element in this array.
Notes
Javascript 1.6 method
See also
http://developer.mozilla.org
every
every: function( fn, bind )
Tests whether all elements in the array pass the test implemented by the provided function.
Notes
Javascript 1.6 method
See also
http://developer.mozilla.org
some
some: function( fn, bind )
Tests whether some element in the array passes the test implemented by the provided function.
Notes
Javascript 1.6 method
See also
http://developer.mozilla.org
indexOf
indexOf: function( item, from )
Returns the first index at which a given element can be found in the array, or -1 if it is not present.
Notes
Javascript 1.6 method
See also
http://developer.mozilla.org
Executes a provided function once per array element.
forEach: function( fn, bind )
Creates a new array with all elements that pass the test implemented by the provided function.
filter: function( fn, bind )
Creates a new array with the results of calling a provided function on every element in this array.
map: function( fn, bind )
Tests whether all elements in the array pass the test implemented by the provided function.
every: function( fn, bind )
Tests whether some element in the array passes the test implemented by the provided function.
some: function( fn, bind )
Returns the first index at which a given element can be found in the array, or -1 if it is not present.
indexOf: function( item, from )
Not documented
normalize: function( sum )
Test wether the array equals to the one passed as parameter.
equals: function( compare )
Not documented
detect: function( iterator )