createMemoryStorage
function createMemoryStorage(options?): MemoryFlagsStorage;Defined in: storage/memory.ts:33
Create an in-memory FlagsStorage. Also implements watch (callbacks
fire on the next microtask after a write/remove) and compareAndSwap.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
MemoryStorageOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createMemoryStorage } from "@xtandard/flags/storage/memory";
const storage = createMemoryStorage();// Optionally seed with pre-existing data:// const storage = createMemoryStorage({ initial: { "my-key": { value: 1 } } });