| Server IP : 162.214.74.102 / Your IP : 216.73.217.80 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/public_html/lrsys_projetos/sopizzas/build/array-invoke/ |
Upload File : |
YUI.add('array-invoke', function (Y, NAME) {
/**
@module collection
@submodule array-invoke
*/
/**
Executes a named method on each item in an array of objects. Items in the array
that do not have a function by that name will be skipped.
@example
Y.Array.invoke(arrayOfDrags, 'plug', Y.Plugin.DDProxy);
@method invoke
@param {Array} items Array of objects supporting the named method.
@param {String} name the name of the method to execute on each item.
@param {Any} [args*] Any number of additional args are passed as parameters to
the execution of the named method.
@return {Array} All return values, indexed according to the item index.
@static
@for Array
**/
Y.Array.invoke = function(items, name) {
var args = Y.Array(arguments, 2, true),
isFunction = Y.Lang.isFunction,
ret = [];
Y.Array.each(Y.Array(items), function(item, i) {
if (item && isFunction(item[name])) {
ret[i] = item[name].apply(item, args);
}
});
return ret;
};
}, 'patched-v3.18.1', {"requires": ["yui-base"]});