lib/api_host.js
function validatePluginName(plugin, pluginList) {
    if (!plugin.name)
        throw new Error(ApiHost.ERR_PLUGIN_MISSING_NAME_PROPERTY);

    pluginList.forEach(function (collectorPlugin) {
        if (plugin.name === collectorPlugin.name) {
            var msg = util.format(ApiHost.ERR_DUPLICATE_PLUGIN_NAME, plugin.name, plugin.extends);
            throw new Error(msg);
        }
    });
}
function validatePluginName(plugin, pluginList) {
    if (!plugin.name)
        throw new Error(ApiHost.ERR_PLUGIN_MISSING_NAME_PROPERTY);

    pluginList.forEach(function (collectorPlugin) {
        if (plugin.name === collectorPlugin.name) {
            var msg = util.format(ApiHost.ERR_DUPLICATE_PLUGIN_NAME, plugin.name, plugin.extends);
            throw new Error(msg);
        }
    });
}
function validatePluginName ( plugin , pluginList ) { if ( ! plugin . name ) throw new Error ( ApiHost . ERR_PLUGIN_MISSING_NAME_PROPERTY ) ; pluginList . forEach ( function ( collectorPlugin ) { if ( plugin . name === collectorPlugin . name ) { var msg = util . format ( ApiHost . ERR_DUPLICATE_PLUGIN_NAME , plugin . name , plugin . extends ) ; throw new Error ( msg ) ; } } ) ; }
Plugin name validation
Plugin name validation