src/module.js
function Module(options) {
  options = options || {};

  if (types.isString(options)) {
    options = {
      name: options
    };
  }

  if (!types.isString(options.name) && !types.isString(options.source)) {
    throw new TypeError("Must provide a name or source for the module");
  }

  this.deps = options.deps ? options.deps.slice(0) : [];
  this.type = options.type || Type.UNKNOWN;
  return this.merge(options);
}
function Module(options) {
  options = options || {};

  if (types.isString(options)) {
    options = {
      name: options
    };
  }

  if (!types.isString(options.name) && !types.isString(options.source)) {
    throw new TypeError("Must provide a name or source for the module");
  }

  this.deps = options.deps ? options.deps.slice(0) : [];
  this.type = options.type || Type.UNKNOWN;
  return this.merge(options);
}
function Module ( options ) { options = options || { } ; if ( types . isString ( options ) ) { options = { name : options } ; } if ( ! types . isString ( options . name ) && ! types . isString ( options . source ) ) { throw new TypeError ( "Must provide a name or source for the module" ) ; } this . deps = options . deps ? options . deps . slice ( 0 ) : [ ] ; this . type = options . type || Type . UNKNOWN ; return this . merge ( options ) ; }
Intermediate representation of a Module which contains the information that is processed
in the different pipelines in order to generate a Module instance.

@class
@memberof Module

@property {string} id - Module id
@property {string} name - Module name
@property {string[]} deps - Array of module dependencies
@property {function} factory - Function that generates the data a particular module exports
@property {any} exports - Data exported by the module
Intermediate representation of a Module which contains the information that is processed in the different pipelines in order to generate a Module instance .