()
| 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() |
no outgoing calls
no test coverage detected