diff --git a/src/index.ts b/src/index.ts index 0a1828d..d519d4c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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");