index.js
function Config( defaults, extend, envName )
{
  // Constants
  // -------------

  // test instance uniqueness
  this._UID         = _.uniqueId('config_')

  this._DEFAULTENV  = 'default'


  // CORE's settings
  // ------------------------

  // default app configuration
  var confDefault = this.getConfigParam( defaults )
    , confExtend  = ( !_.isUndefined( extend ) )
                    ? this.getConfigParam( extend )
                    : {}

  this._ENV    = envName || this._DEFAULTENV
  this._CONFIG = _.merge(
        {}
      , confDefault
      , confExtend
    )

  return this
}
function Config( defaults, extend, envName )
{
  // Constants
  // -------------

  // test instance uniqueness
  this._UID         = _.uniqueId('config_')

  this._DEFAULTENV  = 'default'


  // CORE's settings
  // ------------------------

  // default app configuration
  var confDefault = this.getConfigParam( defaults )
    , confExtend  = ( !_.isUndefined( extend ) )
                    ? this.getConfigParam( extend )
                    : {}

  this._ENV    = envName || this._DEFAULTENV
  this._CONFIG = _.merge(
        {}
      , confDefault
      , confExtend
    )

  return this
}
function Config ( defaults , extend , envName ) { // Constants // ------------- // test instance uniqueness this . _UID = _ . uniqueId ( 'config_' ) this . _DEFAULTENV = 'default' // CORE's settings // ------------------------ // default app configuration var confDefault = this . getConfigParam ( defaults ) , confExtend = ( ! _ . isUndefined ( extend ) ) ? this . getConfigParam ( extend ) : { } this . _ENV = envName || this . _DEFAULTENV this . _CONFIG = _ . merge ( { } , confDefault , confExtend ) return this }
Initialize Config Class  @params  {mixed}   object or file path @params  {mixed}   object or file path @return  {object}  Config instance
Initialize Config Class