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

Method setval

env/env.js:218–232  ·  view source on GitHub ↗
(t, e)

Source from the content-addressed store, hash-verified

216 }
217 }
218 setval(t, e) {
219 switch (this.getEnv()) {
220 case 'Surge':
221 case 'Loon':
222 case 'Stash':
223 case 'Shadowrocket':
224 return $persistentStore.write(t, e)
225 case 'Quantumult X':
226 return $prefs.setValueForKey(t, e)
227 case 'Node.js':
228 return (this.data = this.loaddata()), (this.data[e] = t), this.writedata(), !0
229 default:
230 return (this.data && this.data[e]) || null
231 }
232 }
233 initGotEnv(t) {
234 ;(this.got = this.got ? this.got : require('got')),
235 (this.cktough = this.cktough ? this.cktough : require('tough-cookie')),

Callers 1

setdataMethod · 0.45

Calls 3

getEnvMethod · 0.45
loaddataMethod · 0.45
writedataMethod · 0.45

Tested by

no test coverage detected