MCPcopy Create free account
hub / github.com/Script-Hub-Org/Script-Hub / getval

Method getval

env/env.js:203–217  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

201 return s
202 }
203 getval(t) {
204 switch (this.getEnv()) {
205 case 'Surge':
206 case 'Loon':
207 case 'Stash':
208 case 'Shadowrocket':
209 return $persistentStore.read(t)
210 case 'Quantumult X':
211 return $prefs.valueForKey(t)
212 case 'Node.js':
213 return (this.data = this.loaddata()), this.data[t]
214 default:
215 return (this.data && this.data[t]) || null
216 }
217 }
218 setval(t, e) {
219 switch (this.getEnv()) {
220 case 'Surge':

Callers 2

getdataMethod · 0.45
setdataMethod · 0.45

Calls 2

getEnvMethod · 0.45
loaddataMethod · 0.45

Tested by

no test coverage detected