MCPcopy
hub / github.com/chavyleung/scripts / getEnv

Method getEnv

Env.js:68–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66 }
67
68 getEnv() {
69 if ('undefined' !== typeof Egern) return 'Egern'
70 if ('undefined' !== typeof $environment && $environment['surge-version'])
71 return 'Surge'
72 if ('undefined' !== typeof $environment && $environment['stash-version'])
73 return 'Stash'
74 if ('undefined' !== typeof module && !!module.exports) return 'Node.js'
75 if ('undefined' !== typeof $task) return 'Quantumult X'
76 if ('undefined' !== typeof $loon) return 'Loon'
77 if ('undefined' !== typeof $rocket) return 'Shadowrocket'
78 }
79
80 isNode() {
81 return 'Node.js' === this.getEnv()

Callers 15

isNodeMethod · 0.45
isQuanXMethod · 0.45
isSurgeMethod · 0.45
isLoonMethod · 0.45
isShadowrocketMethod · 0.45
isStashMethod · 0.45
isEgernMethod · 0.45
getvalMethod · 0.45
setvalMethod · 0.45
getMethod · 0.45
postMethod · 0.45
toEnvOptsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected