MCPcopy Create free account
hub / github.com/6dylan6/jdm / constructor

Method constructor

function/common.js:16–32  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

14} catch (e) {}
15class env {
16 constructor(name) {
17 this.config = { ...config,
18 ...process.env,
19 ...user,
20 };
21 this.name = name;
22 this.message = [];
23 this.sharecode = [];
24 this.code = [];
25 this.timestamp = new Date().getTime();
26 this.time = this.start = parseInt(this.timestamp / 1000);
27 this.options = {
28 'headers': {}
29 };
30 console.log(`\n🔔${this.name}, 开始!\n`)
31 console.log(`=========== 脚本执行-北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()} ===========\n`)
32 }
33 done() {
34 let timestamp = new Date().getTime();
35 let work = ((timestamp - this.timestamp) / 1000).toFixed(2)

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected