lib/decorators/BaseDecorator.js
function BaseDecorator(cache, config, configSchema) {
  this._cache = cache;

  if (config) {
    this._configSchema = configSchema;
    this._config = this._humanTimeIntervalToMs(config);
    this._config = this._validateConfig(configSchema, this._config);
  }

  // substitute cb, for cases
  // when you don't need a callback, but
  // don't want to loose the error.
  this._emitError = function (err) {
    if (err) this.emit('error', err);
  }.bind(this);
}
function BaseDecorator(cache, config, configSchema) {
  this._cache = cache;

  if (config) {
    this._configSchema = configSchema;
    this._config = this._humanTimeIntervalToMs(config);
    this._config = this._validateConfig(configSchema, this._config);
  }

  // substitute cb, for cases
  // when you don't need a callback, but
  // don't want to loose the error.
  this._emitError = function (err) {
    if (err) this.emit('error', err);
  }.bind(this);
}
function BaseDecorator ( cache , config , configSchema ) { this . _cache = cache ; if ( config ) { this . _configSchema = configSchema ; this . _config = this . _humanTimeIntervalToMs ( config ) ; this . _config = this . _validateConfig ( configSchema , this . _config ) ; } // substitute cb, for cases // when you don't need a callback, but // don't want to loose the error. this . _emitError = function ( err ) { if ( err ) this . emit ( 'error' , err ) ; } . bind ( this ) ; }
The root of the Decorator tree
@constructor
The root of the Decorator tree