MCPcopy Index your code
hub / github.com/chavyleung/scripts / getval

Method getval

Env.js:296–312  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

294 }
295
296 getval(key) {
297 switch (this.getEnv()) {
298 case 'Surge':
299 case 'Loon':
300 case 'Stash':
301 case 'Shadowrocket':
302 case 'Egern':
303 return $persistentStore.read(key)
304 case 'Quantumult X':
305 return $prefs.valueForKey(key)
306 case 'Node.js':
307 this.data = this.loaddata()
308 return this.data[key]
309 default:
310 return (this.data && this.data[key]) || null
311 }
312 }
313
314 setval(val, key) {
315 switch (this.getEnv()) {

Callers 2

getdataMethod · 0.45
setdataMethod · 0.45

Calls 2

getEnvMethod · 0.45
loaddataMethod · 0.45

Tested by

no test coverage detected