10 lines
294 B
JavaScript
10 lines
294 B
JavaScript
|
export function getStore(store, key) {
|
||
|
return store[key];
|
||
|
}
|
||
|
export function setStore(store, key, value) {
|
||
|
if (Object.isFrozen(store)) {
|
||
|
throw new Error(`frozen object is immuatable; cannot set ${String(key)}`);
|
||
|
}
|
||
|
store[key] = value;
|
||
|
}
|
||
|
//# sourceMappingURL=storage.js.map
|