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

Method constructor

Script/Env.js:3–15  ·  view source on GitHub ↗
(name, opts)

Source from the content-addressed store, hash-verified

1function Env(name, opts) {
2 return new (class {
3 constructor(name, opts) {
4 this.name = name
5 this.version = '1.7.5'
6 this.data = null
7 this.logs = []
8 this.isMute = false
9 this.isNeedRewrite = false
10 this.logSeparator = '\n'
11 this.encoding = 'utf-8'
12 this.startTime = new Date().getTime()
13 Object.assign(this, opts)
14 this.log('', `🔔${this.name}, 开始!`)
15 }
16
17 platform() {
18 if ('undefined' !== typeof $environment && $environment['surge-version'])

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected