/
Config.js
64 lines (52 loc) 路 1.05 KB
/
Config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
export default class Config {
static get pathPrefix() {
return this._pathPrefix || '.';
}
static set pathPrefix(path) {
this._pathPrefix = path;
}
static get skipInput() {
return this._skipInput;
}
static set skipInput(skip) {
this._skipInput = skip;
}
static get delay() {
return this._delay || 0.6;
}
static set delay(delay) {
this._delay = delay;
}
static get inStream() {
return this._inStream;
}
static set inStream(stream) {
this._inStream = stream;
}
static get outStream() {
return this._outStream;
}
static set outStream(stream) {
this._outStream = stream;
}
static get practiceLevel() {
return this._practiceLevel;
}
static set practiceLevel(practiceLevel) {
this._practiceLevel = practiceLevel;
}
static reset() {
[
'_pathPrefix',
'_skipInput',
'_delay',
'_inStream',
'_outStream',
'_practiceLevel',
].forEach((prop) => {
if (this.hasOwnProperty(prop)) {
delete this[prop];
}
});
}
}