src/observable-hash.js
function(namespace, map) {
    if (typeof namespace === 'string' && typeof map === 'object') {
      if (!this[namespace]) {
        this[namespace] = new ObservableHash(this._observations);
        this[namespace].observersEnabled = this.observersEnabled;
        this._namespaces.push(namespace);
      }
      this._observations.computed.extend(this[namespace], map, { context: this[namespace]._context });
      return this[namespace];
    } else if (namespace && typeof namespace === 'object') {
      this._observations.computed.extend(this, namespace, { context: this._context });
      return this;
    } else {
      throw new TypeError('addComputed must have a map object');
    }
  }
function(namespace, map) {
    if (typeof namespace === 'string' && typeof map === 'object') {
      if (!this[namespace]) {
        this[namespace] = new ObservableHash(this._observations);
        this[namespace].observersEnabled = this.observersEnabled;
        this._namespaces.push(namespace);
      }
      this._observations.computed.extend(this[namespace], map, { context: this[namespace]._context });
      return this[namespace];
    } else if (namespace && typeof namespace === 'object') {
      this._observations.computed.extend(this, namespace, { context: this._context });
      return this;
    } else {
      throw new TypeError('addComputed must have a map object');
    }
  }
function ( namespace , map ) { if ( typeof namespace === 'string' && typeof map === 'object' ) { if ( ! this [ namespace ] ) { this [ namespace ] = new ObservableHash ( this . _observations ) ; this [ namespace ] . observersEnabled = this . observersEnabled ; this . _namespaces . push ( namespace ) ; } this . _observations . computed . extend ( this [ namespace ] , map , { context : this [ namespace ] . _context } ) ; return this [ namespace ] ; } else if ( namespace && typeof namespace === 'object' ) { this . _observations . computed . extend ( this , namespace , { context : this . _context } ) ; return this ; } else { throw new TypeError ( 'addComputed must have a map object' ) ; } }
Add computed properties to this hash. If `name` is provided it will add the computed properties to that namespace
on the hash. Otherwise they will be added directly to the hash.
@param {String} name [OPTIONAL] The namespace to add the computed properties under
@param {Object} map The map of computed properties that will be set on this ObservableHash
Add computed properties to this hash . If name is provided it will add the computed properties to that namespace on the hash . Otherwise they will be added directly to the hash .