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

Method getEnv

env/env.js:40–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 // this.log('', `🔔${this.name}, 开始!`)
39 }
40 getEnv() {
41 return 'undefined' != typeof $environment && $environment['surge-version']
42 ? 'Surge'
43 : 'undefined' != typeof $environment && $environment['stash-version']
44 ? 'Stash'
45 : 'undefined' != typeof module && module.exports
46 ? 'Node.js'
47 : 'undefined' != typeof $task
48 ? 'Quantumult X'
49 : 'undefined' != typeof $loon
50 ? 'Loon'
51 : 'undefined' != typeof $rocket
52 ? 'Shadowrocket'
53 : void 0
54 }
55 isNode() {
56 return 'Node.js' === this.getEnv()
57 }

Callers 14

isNodeMethod · 0.45
isQuanXMethod · 0.45
isSurgeMethod · 0.45
isLoonMethod · 0.45
isShadowrocketMethod · 0.45
isStashMethod · 0.45
getvalMethod · 0.45
setvalMethod · 0.45
getMethod · 0.45
postMethod · 0.45
iMethod · 0.45
msgMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected