*Update dist
This commit is contained in:
parent
c893ddd428
commit
30de3530fc
|
@ -40,7 +40,7 @@ export default class Config {
|
||||||
open(file: string): void;
|
open(file: string): void;
|
||||||
openDir(dir: string): void;
|
openDir(dir: string): void;
|
||||||
openJson(file: string): void;
|
openJson(file: string): void;
|
||||||
saveConfigJson(data: object): void;
|
saveConfigJson(file: string, data: object): void;
|
||||||
filter(name: string): Config;
|
filter(name: string): Config;
|
||||||
set(key: string, value: any): void;
|
set(key: string, value: any): void;
|
||||||
has(key: string): boolean;
|
has(key: string): boolean;
|
||||||
|
|
|
@ -134,10 +134,10 @@ class Config {
|
||||||
}
|
}
|
||||||
this.prefix = this.getPrefix();
|
this.prefix = this.getPrefix();
|
||||||
}
|
}
|
||||||
saveConfigJson(data) {
|
saveConfigJson(file, data) {
|
||||||
(0, bsert_1.default)(typeof data === "object");
|
(0, bsert_1.default)(typeof data === "object");
|
||||||
(0, bsert_1.default)(!Array.isArray(data));
|
(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) {
|
filter(name) {
|
||||||
(0, bsert_1.default)(typeof name === "string");
|
(0, bsert_1.default)(typeof name === "string");
|
||||||
|
|
Loading…
Reference in New Issue