stable

memory

Fuller in-memory store for noy-db — tests, REPLs, and ephemeral caches, with listVaults, ping, and atomic multi-record tx.

@noy-db/to-memory · pnpm add @noy-db/to-memory The fuller in-memory store — reach for it once the kernel's built-in default isn't enough.

Shaperecord
Atomic CAS✓
Localitylocal
Speedfast
Persistenceephemeral

What it does

createNoydb() already ships a built-in in-memory default store, so to-memory isn't a prerequisite to start. It's the package to reach for once you need the optional NoydbStore methods the built-in default omits: listVaults, atomic multi-record tx, or ping. Data lives only in the current process — it's gone when the process exits. Use it for unit/integration tests, short-lived scripts, benchmarks, and prototyping before wiring up persistent storage.

Notes

  • casAtomic: true, txAtomic: true — synchronous ops over nested Maps are inherently atomic, making it a great sanity backstop to test other stores against.
  • Record shape (one envelope per record), not bundle.
  • Factory: toMemory(opts?: { clockUncertaintyMs?: number }).

See also