feat(store): load/save and target accessors with validation

This commit is contained in:
dev
2026-06-01 16:08:42 -05:00
parent 48e51054ca
commit 231890a9e0
3 changed files with 138 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
export function createLocalStorage() {
const data = new Map();
return {
getItem(k) { return data.has(k) ? data.get(k) : null; },
setItem(k, v) { data.set(k, String(v)); },
removeItem(k) { data.delete(k); },
clear() { data.clear(); },
};
}