lib/services/plugins.js
function initPlugins(router, site) {
  return bluebird.all(module.exports.plugins.map(plugin => {
    return bluebird.try(() => {
      if (typeof plugin === 'function') {
        return plugin(router, pluginDBAdapter, publish, sites, site);
      } else {
        log('warn', 'Plugin is not a function');
        return bluebird.resolve();
      }
    });
  }));
}
function initPlugins(router, site) {
  return bluebird.all(module.exports.plugins.map(plugin => {
    return bluebird.try(() => {
      if (typeof plugin === 'function') {
        return plugin(router, pluginDBAdapter, publish, sites, site);
      } else {
        log('warn', 'Plugin is not a function');
        return bluebird.resolve();
      }
    });
  }));
}
function initPlugins ( router , site ) { return bluebird . all ( module . exports . plugins . map ( plugin => { return bluebird . try ( ( ) => { if ( typeof plugin === 'function' ) { return plugin ( router , pluginDBAdapter , publish , sites , site ) ; } else { log ( 'warn' , 'Plugin is not a function' ) ; return bluebird . resolve ( ) ; } } ) ; } ) ) ; }
Call each plugin and pass along the router,
a subset of the db service the publish method
of the bus service.

@param {Object} router
@param {Object} site
@returns {Promise}
Call each plugin and pass along the router a subset of the db service the publish method of the bus service .