Create a store that keeps every kernl key under one prefix, so the host's storage can also hold kehto's and the app's own keys without collisions.
Corrupt JSON reads as the fallback rather than throwing: persisted state is a convenience, and a damaged value must never stop the shell from booting.
Synchronous key-value storage; localStorage or a Map-backed fake.
localStorage
Namespace prepended to every key, for example kernl.
kernl
A namespaced JSON store.
const store = createNamespacedStore(localStorage, 'kernl');store.setJson('relays:v1', { apps: ['wss://relay.napplet.soy'] });store.getJson('relays:v1', {}); // { apps: [...] } Copy
const store = createNamespacedStore(localStorage, 'kernl');store.setJson('relays:v1', { apps: ['wss://relay.napplet.soy'] });store.getJson('relays:v1', {}); // { apps: [...] }
Create a store that keeps every kernl key under one prefix, so the host's storage can also hold kehto's and the app's own keys without collisions.
Corrupt JSON reads as the fallback rather than throwing: persisted state is a convenience, and a damaged value must never stop the shell from booting.