code: function set(key, value) {
          if (global.localStorage) {
              var _value;
              try {
                  _value = JSON.stringify(value);
                  global.localStorage.setItem(key, _value);
                  $(exports).triggerHandler("change", [key, value]);
              } catch (e) {
                  console.error("[PreferenceManager] Failed to write preference value of key: " + key);
              }
          }
      }
docs: Change value of key
  @param {string} key
  @param {?} value