js/util.js
function (plugins, func) {
                var idx, plugin = null;
                // iterate to process in reverse order without side-effects.
                for (idx = 1; idx <= plugins.length; idx += 1) {
                    plugin = plugins[plugins.length - idx];
                    func(plugin);
                    if (plugin.stopProcessing) {
                        break;
                    }
                }
            }
function (plugins, func) {
                var idx, plugin = null;
                // iterate to process in reverse order without side-effects.
                for (idx = 1; idx <= plugins.length; idx += 1) {
                    plugin = plugins[plugins.length - idx];
                    func(plugin);
                    if (plugin.stopProcessing) {
                        break;
                    }
                }
            }
function ( plugins , func ) { var idx , plugin = null ; // iterate to process in reverse order without side-effects. for ( idx = 1 ; idx <= plugins . length ; idx += 1 ) { plugin = plugins [ plugins . length - idx ] ; func ( plugin ) ; if ( plugin . stopProcessing ) { break ; } } }
Execute a plugin array, terminating if a plugin sets its stopProcessing property.
@param plugins - the array of plugins to execute.
@param func - the function to apply to each plugin, it accepts the plugin its single parameter.
Execute a plugin array terminating if a plugin sets its stopProcessing property .