From 30de3530fcfc8073c9a44d60e2ab8ea5e111c460 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 21 Sep 2022 16:30:17 -0400 Subject: [PATCH] *Update dist --- dist/index.d.ts | 2 +- dist/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index c38b3eb..4dc8bd1 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -40,7 +40,7 @@ export default class Config { open(file: string): void; openDir(dir: string): void; openJson(file: string): void; - saveConfigJson(data: object): void; + saveConfigJson(file: string, data: object): void; filter(name: string): Config; set(key: string, value: any): void; has(key: string): boolean; diff --git a/dist/index.js b/dist/index.js index c9ec3cb..264f41a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -134,10 +134,10 @@ class Config { } this.prefix = this.getPrefix(); } - saveConfigJson(data) { + saveConfigJson(file, data) { (0, bsert_1.default)(typeof data === "object"); (0, bsert_1.default)(!Array.isArray(data)); - fs_1.default.writeFileSync(this.str("configdir"), JSON.stringify(data)); + fs_1.default.writeFileSync(path_1.default.join(this.str("configdir"), file), JSON.stringify(data)); } filter(name) { (0, bsert_1.default)(typeof name === "string");