*add saveConfigJson method

This commit is contained in:
Derrick Hammer 2022-09-21 16:27:38 -04:00
parent 909e233f23
commit d50269aac7
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 7 additions and 0 deletions

View File

@ -172,6 +172,13 @@ export default class Config {
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) {
assert(typeof name === "string");