lib/Agent.js
function _getModuleConstructor(name) {
  var constructor = Agent.modules[name];
  if (!constructor) {
    throw new Error('Unknown module "' + name + '". ' +
        'Choose from: ' + Object.keys(Agent.modules).map(JSON.stringify).join(', '));
  }
  return constructor;
}
function _getModuleConstructor(name) {
  var constructor = Agent.modules[name];
  if (!constructor) {
    throw new Error('Unknown module "' + name + '". ' +
        'Choose from: ' + Object.keys(Agent.modules).map(JSON.stringify).join(', '));
  }
  return constructor;
}
function _getModuleConstructor ( name ) { var constructor = Agent . modules [ name ] ; if ( ! constructor ) { throw new Error ( 'Unknown module "' + name + '". ' + 'Choose from: ' + Object . keys ( Agent . modules ) . map ( JSON . stringify ) . join ( ', ' ) ) ; } return constructor ; }
Get a module constructor by it's name.
Throws an error when the module is not found.
@param {string} name
@return {function} Returns the modules constructor function
@private
Get a module constructor by it s name . Throws an error when the module is not found .