MCPcopy Create free account
hub / github.com/Semporia/Scripts / setval

Method setval

jd_try.js:758–771  ·  view source on GitHub ↗
(val, key)

Source from the content-addressed store, hash-verified

756 }
757
758 setval(val, key) {
759 if (this.isSurge() || this.isLoon()) {
760 return $persistentStore.write(val, key)
761 } else if (this.isQuanX()) {
762 return $prefs.setValueForKey(val, key)
763 } else if (this.isNode()) {
764 this.data = this.loaddata()
765 this.data[key] = val
766 this.writedata()
767 return true
768 } else {
769 return (this.data && this.data[key]) || null
770 }
771 }
772
773 initGotEnv(opts) {
774 this.got = this.got ? this.got : require('got')

Callers 1

setdataMethod · 0.45

Calls 7

writeMethod · 0.80
isSurgeMethod · 0.45
isLoonMethod · 0.45
isQuanXMethod · 0.45
isNodeMethod · 0.45
loaddataMethod · 0.45
writedataMethod · 0.45

Tested by

no test coverage detected