MCPcopy Create free account
hub / github.com/ClydeTime/Surge / platform

Method platform

Script/Env.js:17–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 }
16
17 platform() {
18 if ('undefined' !== typeof $environment && $environment['surge-version'])
19 return 'Surge'
20 if ('undefined' !== typeof $environment && $environment['stash-version'])
21 return 'Stash'
22 if ('undefined' !== typeof module && !!module.exports) return 'Node.js'
23 if ('undefined' !== typeof $task) return 'Quantumult X'
24 if ('undefined' !== typeof $loon) return 'Loon'
25 if ('undefined' !== typeof $rocket) return 'Shadowrocket'
26 if ('undefined' !== typeof Egern) return 'Egern'
27 }
28
29 isQuanX() {
30 return 'Quantumult X' === this.platform()

Callers 13

isQuanXMethod · 0.45
isSurgeMethod · 0.45
isLoonMethod · 0.45
isShadowrocketMethod · 0.45
isStashMethod · 0.45
isEgernMethod · 0.45
getItemMethod · 0.45
setItemMethod · 0.45
fetchMethod · 0.45
toEnvOptsMethod · 0.45
msgMethod · 0.45
logErrMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected