templates-mo
Version:
Templates is a scaffolding framework that makes code generation simple, dynamic, and reusable. Generate files, parts of your app, or whole project structures—without the repetitive copy-pasting
24 lines (18 loc) • 467 B
text/typescript
import { defaults } from '@tps/utilities/helpers';
export default class Config {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
private configurations: Record<string, any>;
constructor() {
this.configurations = {};
}
load(configObject) {
this.configurations = defaults(configObject, this.configurations);
return this;
}
get(prop) {
return this.configurations[prop];
}
set(prop, value) {
this.configurations[prop] = value;
}
}