lib/config/buddyPlugins.js
function registerPlugin(resource, config, silent) {
  let module;

  try {
    module = 'string' == typeof resource ? require(resource) : resource;
  } catch (err) {
    return warn(`unable to load plugin ${strong(resource)}`);
  }

  if (!('register' in module)) return warn(`invalid plugin ${strong(resource)}`);

  module.register(config);
  if (!silent) print(`registered plugin ${strong(module.name)}`, 0);
}
function registerPlugin(resource, config, silent) {
  let module;

  try {
    module = 'string' == typeof resource ? require(resource) : resource;
  } catch (err) {
    return warn(`unable to load plugin ${strong(resource)}`);
  }

  if (!('register' in module)) return warn(`invalid plugin ${strong(resource)}`);

  module.register(config);
  if (!silent) print(`registered plugin ${strong(module.name)}`, 0);
}
function registerPlugin ( resource , config , silent ) { let module ; try { module = 'string' == typeof resource ? require ( resource ) : resource ; } catch ( err ) { return warn ( ` ${ strong ( resource ) } ` ) ; } if ( ! ( 'register' in module ) ) return warn ( ` ${ strong ( resource ) } ` ) ; module . register ( config ) ; if ( ! silent ) print ( ` ${ strong ( module . name ) } ` , 0 ) ; }
Register plugin 'resource'
@param {String} resource
@param {Object} config
@param {Boolean} [silent]
@returns {null}
Register plugin resource