cineflex/public/js/freq.js
2023-02-02 08:17:38 +01:00

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();