@xtandard/audit/storage/memory
In-memory storage: createMemoryStorage(), for tests, development and the
demo. Zero dependencies; implements every optional capability (watch,
compare-and-swap, native event log).
import { … } from "@xtandard/audit/storage/memory";Functions
Section titled “Functions”| Name | Summary |
|---|---|
createMemoryStorage |
Create an in-memory MemoryAuditStorage with every optional capability. watch fires callbacks on the next microtask after a write/remove; compareAndSwap compares deep equality; events live in per-tenant arrays ordered by seq (single-threaded JS makes append-with-conflict-check atomic in-process). |
Type aliases
Section titled “Type aliases”| Name | Summary |
|---|---|
MemoryAuditStorage |
The full capability set the memory adapter implements. |
MemoryStorageOptions |
Options for createMemoryStorage: optional seed data (key → value) and an onWrite hook. |