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