kernl API
    Preparing search index...

    Function createNamespacedStore

    • 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.

      Parameters

      • storage: StorageLike

        Synchronous key-value storage; localStorage or a Map-backed fake.

      • prefix: string

        Namespace prepended to every key, for example kernl.

      Returns NamespacedStore

      A namespaced JSON store.

      const store = createNamespacedStore(localStorage, 'kernl');
      store.setJson('relays:v1', { apps: ['wss://relay.napplet.soy'] });
      store.getJson('relays:v1', {}); // { apps: [...] }