MCPcopy Create free account
hub / github.com/Moli-X/Resources / write

Method write

Script/Hzh.js:401–418  ·  view source on GitHub ↗
(data, key)

Source from the content-addressed store, hash-verified

399 }
400
401 write(data, key) {
402 this.log(`SET ${key}`);
403 if (key.indexOf("#") !== -1) {
404 key = key.substr(1);
405 if (isSurge || isLoon) {
406 return $persistentStore.write(data, key);
407 }
408 if (isQX) {
409 return $prefs.setValueForKey(data, key);
410 }
411 if (isNode) {
412 this.root[key] = data;
413 }
414 } else {
415 this.cache[key] = data;
416 }
417 this.persistCache();
418 }
419
420 read(key) {
421 this.log(`READ ${key}`);

Callers 15

setvalMethod · 0.45
getCookieFunction · 0.45
persistCacheMethod · 0.45
deleteMethod · 0.45
nFunction · 0.45
OFunction · 0.45
PFunction · 0.45
SubOne.jsFile · 0.45
tFunction · 0.45
createArtifactFunction · 0.45
updateArtifactFunction · 0.45
_deleteArtifactFunction · 0.45

Calls 3

persistCacheMethod · 0.80
logMethod · 0.45
indexOfMethod · 0.45

Tested by

no test coverage detected