X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..HEAD:/docs/output/Ext.Array.js?ds=sidebyside diff --git a/docs/output/Ext.Array.js b/docs/output/Ext.Array.js index fe91fd3e..119ace85 100644 --- a/docs/output/Ext.Array.js +++ b/docs/output/Ext.Array.js @@ -1,852 +1 @@ -Ext.data.JsonP.Ext_Array({ - "tagname": "class", - "name": "Ext.Array", - "doc": "
A set of useful static methods to deal with arrays; provide missing methods for older browsers.
\n", - "extends": null, - "mixins": [ - - ], - "alternateClassNames": [ - - ], - "xtype": null, - "author": "Jacky NguyenFilter through an array and remove empty item as defined in Ext.isEmpty
\n\n@see Ext.Array.filter
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "results
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 344, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-clean", - "shortDoc": "Filter through an array and remove empty item as defined in Ext.isEmpty
\n\n@see Ext.Array.filter
\n" - }, - { - "tagname": "method", - "name": "clone", - "member": "Ext.Array", - "doc": "Clone a flat array without referencing the previous one. Note that this is different\nfrom Ext.clone since it doesn't handle recursive cloning. It's simply a convenient, easy-to-remember method\nfor Array.prototype.slice.call(array)
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "The array
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "The clone array
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 477, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-clone", - "shortDoc": "Clone a flat array without referencing the previous one. Note that this is different\nfrom Ext.clone since it doesn't ..." - }, - { - "tagname": "method", - "name": "contains", - "member": "Ext.Array", - "doc": "Checks whether or not the given array
contains the specified item
The array to check
\n", - "optional": false - }, - { - "type": "Mixed", - "name": "item", - "doc": "The item to look for
\n", - "optional": false - } - ], - "return": { - "type": "Boolean", - "doc": "True if the array contains the item, false otherwise
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 161, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-contains", - "shortDoc": "Checks whether or not the given array
contains the specified item
Perform a set difference A-B by subtracting all items in array B from array A.
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "A
\n", - "optional": false - }, - { - "type": "Array", - "name": "array", - "doc": "B
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "difference
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 556, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-difference", - "shortDoc": "Perform a set difference A-B by subtracting all items in array B from array A.
\n" - }, - { - "tagname": "method", - "name": "each", - "member": "Ext.Array", - "doc": "Iterates an array or an iterable value and invoke the given callback function for each item.
\n\nvar countries = ['Vietnam', 'Singapore', 'United States', 'Russia'];\n\nExt.Array.each(countries, function(name, index, countriesItSelf) {\n console.log(name);\n});\n\nvar sum = function() {\n var sum = 0;\n\n Ext.Array.each(arguments, function(value) {\n sum += value;\n });\n\n return sum;\n};\n\nsum(1, 2, 3); // returns 6\n
\n\nThe iteration can be stopped by returning false in the function callback.
\n\nExt.Array.each(countries, function(name, index, countriesItSelf) {\n if (name === 'Singapore') {\n return false; // break here\n }\n});\n
\n",
- "params": [
- {
- "type": "Array/NodeList/Mixed",
- "name": "iterable",
- "doc": "The value to be iterated. If this\nargument is not iterable, the callback function is called once.
\n", - "optional": false - }, - { - "type": "Function", - "name": "fn", - "doc": "The callback function. If it returns false, the iteration stops and this method returns\nthe current index
. Arguments passed to this callback function are:
item
: {Mixed} The item at the current index
in the passed array
index
: {Number} The current index
within the array
allItems
: {Array/NodeList/Mixed} The array
passed as the first argument to Ext.Array.each
(Optional) The scope (this
reference) in which the specified function is executed.
(Optional) Reverse the iteration order (loop from the end to the beginning)\nDefaults false
\n", - "optional": false - } - ], - "return": { - "type": "Boolean", - "doc": "See description for the fn
parameter.
Executes the specified function for each array element until the function returns a falsy value.\nIf such an item is found, the function will return false immediately.\nOtherwise, it will return true.
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "\n", - "optional": false - }, - { - "type": "Function", - "name": "fn", - "doc": "Callback function for each item
\n", - "optional": false - }, - { - "type": "Object", - "name": "scope", - "doc": "Callback function scope
\n", - "optional": false - } - ], - "return": { - "type": "Boolean", - "doc": "True if no false value is returned by the callback function.
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 281, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-every", - "shortDoc": "Executes the specified function for each array element until the function returns a falsy value.\nIf such an item is f..." - }, - { - "tagname": "method", - "name": "filter", - "member": "Ext.Array", - "doc": "Creates a new array with all of the elements of this array for which\nthe provided filtering function returns true.
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "\n", - "optional": false - }, - { - "type": "Function", - "name": "fn", - "doc": "Callback function for each item
\n", - "optional": false - }, - { - "type": "Object", - "name": "scope", - "doc": "Callback function scope
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "results
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 391, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-filter", - "shortDoc": "Creates a new array with all of the elements of this array for which\nthe provided filtering function returns true.
\n" - }, - { - "tagname": "method", - "name": "flatten", - "member": "Ext.Array", - "doc": "Recursively flattens into 1-d Array. Injects Arrays inline.
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "The array to flatten
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "The new, flattened array.
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 625, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-flatten", - "shortDoc": "Recursively flattens into 1-d Array. Injects Arrays inline.
\n" - }, - { - "tagname": "method", - "name": "forEach", - "member": "Ext.Array", - "doc": "Iterates an array and invoke the given callback function for each item. Note that this will simply\ndelegate to the native Array.prototype.forEach method if supported.\nIt doesn't support stopping the iteration by returning false in the callback function like\neach. However, performance could be much better in modern browsers comparing with\neach
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "The array to iterate
\n", - "optional": false - }, - { - "type": "Function", - "name": "fn", - "doc": "The function callback, to be invoked these arguments:
\n\nitem
: {Mixed} The item at the current index
in the passed array
index
: {Number} The current index
within the array
allItems
: {Array} The array
itself which was passed as the first argument(Optional) The execution scope (this
) in which the specified function is executed.
Converts a value to an array if it's not already an array; returns:
\n\nundefined
or null
The value to convert to an array if it's not already is an array
\n", - "optional": false - }, - { - "type": "Boolean", - "name": "newReference", - "doc": "(Optional) newReference True to clone the given array and return a new reference if necessary,\ndefaults to false
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "array
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 417, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-from", - "shortDoc": "Converts a value to an array if it's not already an array; returns:\n\n\nAn empty array if given value is undefined or n..." - }, - { - "tagname": "method", - "name": "include", - "member": "Ext.Array", - "doc": "Push an item into the array only if the array doesn't contain it yet
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "The array
\n", - "optional": false - }, - { - "type": "Mixed", - "name": "item", - "doc": "The item to include
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "The passed array itself
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 464, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-include", - "shortDoc": "Push an item into the array only if the array doesn't contain it yet
\n" - }, - { - "tagname": "method", - "name": "indexOf", - "member": "Ext.Array", - "doc": "Get the index of the provided item
in the given array
, a supplement for the\nmissing arrayPrototype.indexOf in Internet Explorer.
The array to check
\n", - "optional": false - }, - { - "type": "Mixed", - "name": "item", - "doc": "The item to look for
\n", - "optional": false - }, - { - "type": "Number", - "name": "from", - "doc": "(Optional) The index at which to begin the search
\n", - "optional": false - } - ], - "return": { - "type": "Number", - "doc": "The index of item in the array (or -1 if it is not found)
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 135, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-indexOf", - "shortDoc": "Get the index of the provided item in the given array, a supplement for the\nmissing arrayPrototype.indexOf in Interne..." - }, - { - "tagname": "method", - "name": "intersect", - "member": "Ext.Array", - "doc": "Merge multiple arrays into one with unique items that exist in all of the arrays.
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": ",...
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "intersect
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 507, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-intersect", - "shortDoc": "Merge multiple arrays into one with unique items that exist in all of the arrays.
\n" - }, - { - "tagname": "method", - "name": "map", - "member": "Ext.Array", - "doc": "Creates a new array with the results of calling a provided function on every element in this array.
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "\n", - "optional": false - }, - { - "type": "Function", - "name": "fn", - "doc": "Callback function for each item
\n", - "optional": false - }, - { - "type": "Object", - "name": "scope", - "doc": "Callback function scope
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "results
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 258, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-map", - "shortDoc": "Creates a new array with the results of calling a provided function on every element in this array.
\n" - }, - { - "tagname": "method", - "name": "max", - "member": "Ext.Array", - "doc": "Returns the maximum value in the Array
\n", - "params": [ - { - "type": "Array|NodeList", - "name": "array", - "doc": "The Array from which to select the maximum value.
\n", - "optional": false - }, - { - "type": "Function", - "name": "comparisonFn", - "doc": "(optional) a function to perform the comparision which determines maximization.
\n\n If omitted the \">\" operator will be used. Note: gt = 1; eq = 0; lt = -1\n
\n",
- "optional": true
- }
- ],
- "return": {
- "type": "Mixed",
- "doc": "maxValue The maximum value
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 681, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-max", - "shortDoc": "Returns the maximum value in the Array
\n" - }, - { - "tagname": "method", - "name": "mean", - "member": "Ext.Array", - "doc": "Calculates the mean of all items in the array
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "The Array to calculate the mean value of.
\n", - "optional": false - } - ], - "return": { - "type": "Number", - "doc": "The mean.
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 710, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-mean", - "shortDoc": "Calculates the mean of all items in the array
\n" - }, - { - "tagname": "method", - "name": "merge", - "member": "Ext.Array", - "doc": "Merge multiple arrays into one with unique items. Alias to union.
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": ",...
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "merged
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 489, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-merge", - "shortDoc": "Merge multiple arrays into one with unique items. Alias to union.
\n" - }, - { - "tagname": "method", - "name": "min", - "member": "Ext.Array", - "doc": "Returns the minimum value in the Array.
\n", - "params": [ - { - "type": "Array|NodeList", - "name": "array", - "doc": "The Array from which to select the minimum value.
\n", - "optional": false - }, - { - "type": "Function", - "name": "comparisonFn", - "doc": "(optional) a function to perform the comparision which determines minimization.
\n\n If omitted the \"<\" operator will be used. Note: gt = 1; eq = 0; lt = -1\n
\n",
- "optional": true
- }
- ],
- "return": {
- "type": "Mixed",
- "doc": "minValue The minimum value
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 652, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-min", - "shortDoc": "Returns the minimum value in the Array.
\n" - }, - { - "tagname": "method", - "name": "pluck", - "member": "Ext.Array", - "doc": "Plucks the value of a property from each item in the Array. Example:
\n\nExt.Array.pluck(Ext.query(\"p\"), \"className\"); // [el1.className, el2.className, ..., elN.className]\n
\n",
- "params": [
- {
- "type": "Array|NodeList",
- "name": "array",
- "doc": "The Array of items to pluck the value from.
\n", - "optional": false - }, - { - "type": "String", - "name": "propertyName", - "doc": "The property name to pluck from each element.
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "The value from each item in the Array.
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 236, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-pluck", - "shortDoc": "Plucks the value of a property from each item in the Array. Example:\n\nExt.Array.pluck(Ext.query(\"p\"), \"className\"); /..." - }, - { - "tagname": "method", - "name": "remove", - "member": "Ext.Array", - "doc": "Removes the specified item from the array if it exists
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "The array
\n", - "optional": false - }, - { - "type": "Mixed", - "name": "item", - "doc": "The item to remove
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "The passed array itself
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 447, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-remove", - "shortDoc": "Removes the specified item from the array if it exists
\n" - }, - { - "tagname": "method", - "name": "some", - "member": "Ext.Array", - "doc": "Executes the specified function for each array element until the function returns a truthy value.\nIf such an item is found, the function will return true immediately. Otherwise, it will return false.
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "\n", - "optional": false - }, - { - "type": "Function", - "name": "fn", - "doc": "Callback function for each item
\n", - "optional": false - }, - { - "type": "Object", - "name": "scope", - "doc": "Callback function scope
\n", - "optional": false - } - ], - "return": { - "type": "Boolean", - "doc": "True if the callback function returns a truthy value.
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 313, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-some", - "shortDoc": "Executes the specified function for each array element until the function returns a truthy value.\nIf such an item is ..." - }, - { - "tagname": "method", - "name": "sort", - "member": "Ext.Array", - "doc": "Sorts the elements of an Array.\nBy default, this method sorts the elements alphabetically and ascending.
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "The array to sort.
\n", - "optional": false - }, - { - "type": "Function", - "name": "sortFn", - "doc": "(optional) The comparison function.
\n", - "optional": true - } - ], - "return": { - "type": "Array", - "doc": "The sorted array.
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 581, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-sort", - "shortDoc": "Sorts the elements of an Array.\nBy default, this method sorts the elements alphabetically and ascending.
\n" - }, - { - "tagname": "method", - "name": "sum", - "member": "Ext.Array", - "doc": "Calculates the sum of all items in the given array
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "The Array to calculate the sum value of.
\n", - "optional": false - } - ], - "return": { - "type": "Number", - "doc": "The sum.
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 719, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-sum", - "shortDoc": "Calculates the sum of all items in the given array
\n" - }, - { - "tagname": "method", - "name": "toArray", - "member": "Ext.Array", - "doc": "Converts any iterable (numeric indices and a length property) into a true array.
\n\nfunction test() {
\n\nvar args = Ext.Array.toArray(arguments),\n fromSecondToLastArgs = Ext.Array.toArray(arguments, 1);\n\nalert(args.join(' '));\nalert(fromSecondToLastArgs.join(' '));\n
\n\n}
\n\ntest('just', 'testing', 'here'); // alerts 'just testing here';
\n\n // alerts 'testing here';\n
\n\nExt.Array.toArray(document.getElementsByTagName('div')); // will convert the NodeList into an array\nExt.Array.toArray('splitted'); // returns ['s', 'p', 'l', 'i', 't', 't', 'e', 'd']\nExt.Array.toArray('splitted', 0, 3); // returns ['s', 'p', 'l', 'i']
\n", - "params": [ - { - "type": "Mixed", - "name": "iterable", - "doc": "the iterable object to be turned into a true Array.
\n", - "optional": false - }, - { - "type": "Number", - "name": "start", - "doc": "(Optional) a zero-based index that specifies the start of extraction. Defaults to 0
\n", - "optional": false - }, - { - "type": "Number", - "name": "end", - "doc": "(Optional) a zero-based index that specifies the end of extraction. Defaults to the last\nindex of the iterable value
\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "array
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 185, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-toArray", - "shortDoc": "Converts any iterable (numeric indices and a length property) into a true array.\n\nfunction test() {\n\nvar args = Ext.A..." - }, - { - "tagname": "method", - "name": "union", - "member": "Ext.Array", - "doc": "Alias to merge.
\n", - "params": [ - - ], - "return": { - "type": "void", - "doc": "\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 746, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-union", - "shortDoc": "Alias to merge.
\n" - }, - { - "tagname": "method", - "name": "unique", - "member": "Ext.Array", - "doc": "Returns a new array with unique items
\n", - "params": [ - { - "type": "Array", - "name": "array", - "doc": "\n", - "optional": false - } - ], - "return": { - "type": "Array", - "doc": "results
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 368, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array-method-unique", - "shortDoc": "Returns a new array with unique items
\n" - } - ], - "property": [ - - ], - "event": [ - - ], - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/lang/Array.js", - "linenr": 1, - "html_filename": "Array2.html", - "href": "Array2.html#Ext-Array", - "cssVar": [ - - ], - "cssMixin": [ - - ], - "component": false, - "superclasses": [ - - ], - "subclasses": [ - - ], - "mixedInto": [ - - ], - "allMixins": [ - - ] -}); \ No newline at end of file +Ext.data.JsonP.Ext_Array({"tagname":"class","html":"Files
A set of useful static methods to deal with arrays; provide missing methods for older browsers.
\nReturns a shallow copy of a part of an array. This is equivalent to the native\ncall \"Array.prototype.slice.call(array, begin, end)\". This is often used when \"array\"\nis \"arguments\" since the arguments object does not supply a slice method but can\nbe the context object to Array.prototype.slice.
\nFilter through an array and remove empty item as defined in Ext.isEmpty
\n\nSee filter
\nresults
\nIterates an array or an iterable value and invoke the given callback function for each item.
\n\nvar countries = ['Vietnam', 'Singapore', 'United States', 'Russia'];\n\nExt.Array.each(countries, function(name, index, countriesItSelf) {\n console.log(name);\n});\n\nvar sum = function() {\n var sum = 0;\n\n Ext.Array.each(arguments, function(value) {\n sum += value;\n });\n\n return sum;\n};\n\nsum(1, 2, 3); // returns 6\n
\n\nThe iteration can be stopped by returning false in the function callback.
\n\nExt.Array.each(countries, function(name, index, countriesItSelf) {\n if (name === 'Singapore') {\n return false; // break here\n }\n});\n
\n\nExt.each is alias for Ext.Array.each
\nThe value to be iterated. If this\nargument is not iterable, the callback function is called once.
\nThe callback function. If it returns false, the iteration stops and this method returns\nthe current index
.
The item at the current index
in the passed array
The current index
within the array
The array
itself which was passed as the first argument
Return false to stop iteration.
\nThe scope (this
reference) in which the specified function is executed.
Reverse the iteration order (loop from the end to the beginning)\nDefaults false
\nSee description for the fn
parameter.
Removes items from an array. This is functionally equivalent to the splice method\nof Array, but works around bugs in IE8's splice method and does not copy the\nremoved elements in order to return them (because very often they are ignored).
\nThe Array on which to replace.
\nThe index in the array at which to operate.
\nThe number of items to remove at index.
\nThe array passed.
\nExecutes the specified function for each array element until the function returns a falsy value.\nIf such an item is found, the function will return false immediately.\nOtherwise, it will return true.
\nCallback function for each item
\nCallback function scope
\nTrue if no false value is returned by the callback function.
\nIterates an array and invoke the given callback function for each item. Note that this will simply\ndelegate to the native Array.prototype.forEach method if supported. It doesn't support stopping the\niteration by returning false in the callback function like each. However, performance\ncould be much better in modern browsers comparing with each
\nConverts a value to an array if it's not already an array; returns:
\n\nundefined
or null
The value to convert to an array if it's not already is an array
\nTrue to clone the given array and return a new reference if necessary,\ndefaults to false
\narray
\nGet the index of the provided item
in the given array
, a supplement for the\nmissing arrayPrototype.indexOf in Internet Explorer.
The array to check
\nThe item to look for
\nThe index at which to begin the search
\nThe index of item in the array (or -1 if it is not found)
\nReturns the maximum value in the Array.
\nThe Array from which to select the maximum value.
\na function to perform the comparision which determines maximization.\nIf omitted the \">\" operator will be used. Note: gt = 1; eq = 0; lt = -1
\nmaxValue The maximum value
\nReturns the minimum value in the Array.
\nThe Array from which to select the minimum value.
\na function to perform the comparision which determines minimization.\nIf omitted the \"<\" operator will be used. Note: gt = 1; eq = 0; lt = -1
\nminValue The minimum value
\nPlucks the value of a property from each item in the Array. Example:
\n\nExt.Array.pluck(Ext.query(\"p\"), \"className\"); // [el1.className, el2.className, ..., elN.className]\n
\nThe Array of items to pluck the value from.
\nThe property name to pluck from each element.
\nThe value from each item in the Array.
\nReplaces items in an array. This is functionally equivalent to the splice method\nof Array, but works around bugs in IE8's splice method and is often more convenient\nto call because it accepts an array of items to insert rather than use a variadic\nargument list.
\nThe Array on which to replace.
\nThe index in the array at which to operate.
\nThe number of items to remove at index (can be 0).
\nAn array of items to insert at index.
\nThe array passed.
\nExecutes the specified function for each array element until the function returns a truthy value.\nIf such an item is found, the function will return true immediately. Otherwise, it will return false.
\nCallback function for each item
\nCallback function scope
\nTrue if the callback function returns a truthy value.
\nReplaces items in an array. This is equivalent to the splice method of Array, but\nworks around bugs in IE8's splice method. The signature is exactly the same as the\nsplice method except that the array is the first argument. All arguments following\nremoveCount are inserted in the array at index.
\nThe Array on which to replace.
\nThe index in the array at which to operate.
\nThe number of items to remove at index (can be 0).
\nAn array containing the removed items.
\nConverts any iterable (numeric indices and a length property) into a true array.
\n\nfunction test() {\n var args = Ext.Array.toArray(arguments),\n fromSecondToLastArgs = Ext.Array.toArray(arguments, 1);\n\n alert(args.join(' '));\n alert(fromSecondToLastArgs.join(' '));\n}\n\ntest('just', 'testing', 'here'); // alerts 'just testing here';\n // alerts 'testing here';\n\nExt.Array.toArray(document.getElementsByTagName('div')); // will convert the NodeList into an array\nExt.Array.toArray('splitted'); // returns ['s', 'p', 'l', 'i', 't', 't', 'e', 'd']\nExt.Array.toArray('splitted', 0, 3); // returns ['s', 'p', 'l', 'i']\n
\n\nExt.toArray is alias for Ext.Array.toArray
\nthe iterable object to be turned into a true Array.
\na zero-based index that specifies the start of extraction. Defaults to 0
\na zero-based index that specifies the end of extraction. Defaults to the last\nindex of the iterable value
\narray
\n