tasks/multimocksGenerator.js
function (data, pluginNames) {
    logger('runPlugins input', data);
    var plugins = pluginNames.map(function (pn) { return pluginRegistry[pn]; }),
      applyPlugin = function (oldData, plugin) { return plugin(oldData); };
    // Use reduce to apply all the plugins to the data
    var output = plugins.reduce(applyPlugin, data);
    logger('runPlugins output', output);
    return output;
  }
function (data, pluginNames) {
    logger('runPlugins input', data);
    var plugins = pluginNames.map(function (pn) { return pluginRegistry[pn]; }),
      applyPlugin = function (oldData, plugin) { return plugin(oldData); };
    // Use reduce to apply all the plugins to the data
    var output = plugins.reduce(applyPlugin, data);
    logger('runPlugins output', output);
    return output;
  }
function ( data , pluginNames ) { logger ( 'runPlugins input' , data ) ; var plugins = pluginNames . map ( function ( pn ) { return pluginRegistry [ pn ] ; } ) , applyPlugin = function ( oldData , plugin ) { return plugin ( oldData ) ; } ; // Use reduce to apply all the plugins to the data var output = plugins . reduce ( applyPlugin , data ) ; logger ( 'runPlugins output' , output ) ; return output ; }
Executes each of the plugins configured in the application to
decorate responses.

@param  {object} data
@param  {array} plugins
@return {object} decoratedData
Executes each of the plugins configured in the application to decorate responses .