MCPcopy Create free account
hub / github.com/facebook/Rapid / setItem

Method setItem

modules/core/StorageSystem.js:106–114  ·  view source on GitHub ↗

* setItem * @param k String key to set the value for * @param v String value to set * @return `true` if the write to `localStorage` succeeded, `false` if it failed

(k, v)

Source from the content-addressed store, hash-verified

104 * @return `true` if the write to `localStorage` succeeded, `false` if it failed
105 */
106 setItem(k, v) {
107 try {
108 this._storage.setItem(k, v);
109 return !this._storage.isMocked;
110 } catch (e) {
111 console.error('localStorage quota exceeded'); // eslint-disable-line no-console
112 }
113 return false;
114 }
115
116
117 /**

Callers 15

setMostRecentMethod · 0.45
saveBackupMethod · 0.45
areaFillModeMethod · 0.45
_updateMethod · 0.45
toggleRuleMethod · 0.45
disableRulesMethod · 0.45
initChangesetFunction · 0.45
changeTagsFunction · 0.45
updateChangesetFunction · 0.45
uiWhatsNewFunction · 0.45
acceptFeatureMethod · 0.45
constructorMethod · 0.45

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected