js/PluginMatcher.js
function (serviceName, methodNames, type, plugins) {

            var newPlugins = [];

            if (plugins && plugins.length > 0) {
                plugins.forEach(function (plugin) {
                    var match = this.matchingMethodNames(serviceName, methodNames, plugin);
                    if (match.length && plugin.type === type) {
                        logger.debug("adding " + plugin.name + " to service only list");
                        newPlugins.push(plugin);
                    } else {
                        logger.debug("not adding " + plugin.name + " to service only list");
                    }
                }, this);
            }

            return newPlugins;

        }
function (serviceName, methodNames, type, plugins) {

            var newPlugins = [];

            if (plugins && plugins.length > 0) {
                plugins.forEach(function (plugin) {
                    var match = this.matchingMethodNames(serviceName, methodNames, plugin);
                    if (match.length && plugin.type === type) {
                        logger.debug("adding " + plugin.name + " to service only list");
                        newPlugins.push(plugin);
                    } else {
                        logger.debug("not adding " + plugin.name + " to service only list");
                    }
                }, this);
            }

            return newPlugins;

        }
function ( serviceName , methodNames , type , plugins ) { var newPlugins = [ ] ; if ( plugins && plugins . length > 0 ) { plugins . forEach ( function ( plugin ) { var match = this . matchingMethodNames ( serviceName , methodNames , plugin ) ; if ( match . length && plugin . type === type ) { logger . debug ( "adding " + plugin . name + " to service only list" ) ; newPlugins . push ( plugin ) ; } else { logger . debug ( "not adding " + plugin . name + " to service only list" ) ; } } , this ) ; } return newPlugins ; }
Returns just the plugins from the given array with pointcuts that match the
any method on a service.

@param serviceName - the name of the service to match against.
@param methodNames - the names of all methods on this service.
@param type - the type of plugin to match.
@param plugins - the array of plugins to use as the domain.
Returns just the plugins from the given array with pointcuts that match the any method on a service .