You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
465 B
36 lines
465 B
/**
|
|
*
|
|
*
|
|
*/
|
|
|
|
class ConfigStore {
|
|
|
|
constructor() {
|
|
if (!ConfigStore.instance) {
|
|
ConfigStore.instance = this;
|
|
this._data = {}
|
|
}
|
|
|
|
return ConfigStore.instance;
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
set(key, value) {
|
|
this._data[key] = value
|
|
}
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
get(key) {
|
|
return this._data[key]
|
|
}
|
|
}
|
|
|
|
// create instance
|
|
const instance = new ConfigStore();
|
|
|
|
export default instance |