*add saveConfigJson method
This commit is contained in:
parent
909e233f23
commit
d50269aac7
|
@ -172,6 +172,13 @@ export default class Config {
|
||||||
this.prefix = this.getPrefix();
|
this.prefix = this.getPrefix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public saveConfigJson(data: object) {
|
||||||
|
assert(typeof data === "object");
|
||||||
|
assert(!Array.isArray(data));
|
||||||
|
|
||||||
|
fs.writeFileSync(this.str("configdir"), JSON.stringify(data));
|
||||||
|
}
|
||||||
|
|
||||||
public filter(name: string) {
|
public filter(name: string) {
|
||||||
assert(typeof name === "string");
|
assert(typeof name === "string");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue