mirror of
https://github.com/vale981/grapher
synced 2025-03-11 21:36:39 -04:00
21 lines
383 B
JavaScript
21 lines
383 B
JavaScript
![]() |
export default new class {
|
||
|
constructor() {
|
||
|
this.storage = {};
|
||
|
}
|
||
|
|
||
|
add(key, value) {
|
||
|
if (this.storage[key]) {
|
||
|
throw new Meteor.Error(`Frozen query with key ${key} is already defined`);
|
||
|
}
|
||
|
|
||
|
this.storage[key] = value;
|
||
|
}
|
||
|
|
||
|
get(key) {
|
||
|
return this.storage[key];
|
||
|
}
|
||
|
|
||
|
getAll() {
|
||
|
return this.storage;
|
||
|
}
|
||
|
}
|