Skip to content

@xtandard/flags/storage/memory

In-memory storage: createMemoryStorage, with change notifications and no dependencies. For tests, development and single-process setups; also the default runtime storage when none is given.

Subpath entry for @xtandard/flags/storage/memory: re-exports the adapter so the bundler can map it to its own dist file.

import { … } from "@xtandard/flags/storage/memory";
Name Summary
createMemoryStorage Create an in-memory FlagsStorage. Also implements watch (callbacks fire on the next microtask after a write/remove) and compareAndSwap.
Name Summary
MemoryFlagsStorage A watchable, compare-and-swap capable in-memory storage.
MemoryStorageOptions Options for createMemoryStorage: optional initial seed data and an onWrite hook.