function preferencesGet(name) {
    return this.initializedPromise.then(function () {
      var defaultValue = DEFAULT_PREFERENCES[name];

      if (defaultValue === undefined) {
        throw new Error('preferencesGet: \'' + name + '\' is undefined.');
      } else {
        var prefValue = this.prefs[name];

        if (prefValue !== undefined) {
          return prefValue;
        }
      }
      return defaultValue;
    }.bind(this));
  }
/**
   * Get the value of a preference.
   * @param {string} name The name of the preference whose value is requested.
   * @return {Promise} A promise that is resolved with a {boolean|number|string}
   *                   containing the value of the preference.
   */
Get the value of a preference.
@param {string} name The name of the preference whose value is requested.
@return {Promise} A promise that is resolved with a {boolean|number|string}
containing the value of the preference.
Get the value of a preference . @param { string } name The name of the preference whose value is requested . @return { Promise } A promise that is resolved with a { boolean|number|string } containing the value of the preference .
function preferencesGet(name) {
    return this.initializedPromise.then(function () {
      var defaultValue = DEFAULT_PREFERENCES[name];
      if (defaultValue === undefined) {
        throw new Error('preferencesGet: \'' + name + '\' is undefined.');
      } else {
        var prefValue = this.prefs[name];
        if (prefValue !== undefined) {
          return prefValue;
        }
      }
      return defaultValue;
    }.bind(this));
  }
function preferencesGet ( name ) { return this . initializedPromise . then ( function ( ) { var defaultValue = DEFAULT_PREFERENCES [ name ] ; if ( defaultValue === undefined ) { throw new Error ( 'preferencesGet: \'' + name + '\' is undefined.' ) ; } else { var prefValue = this . prefs [ name ] ; if ( prefValue !== undefined ) { return prefValue ; } } return defaultValue ; } . bind ( this ) ) ; }
Get the value of a preference.
Get the value of a preference .