24 lines
409 B
JavaScript
24 lines
409 B
JavaScript
class FreqManager {
|
|
#store;
|
|
static getInstance() {
|
|
if (this._instance === null) {
|
|
this._instance = new FreqManager();
|
|
}
|
|
return this._instance;
|
|
}
|
|
|
|
constructor() {
|
|
this.#store = {};
|
|
}
|
|
|
|
set(key, value) {
|
|
this.#store[key] = value;
|
|
}
|
|
|
|
get(key) {
|
|
return this.#store[key];
|
|
}
|
|
|
|
}
|
|
|
|
window.freq = FreqManager.getInstance();
|