memoryKv()
Create an in-memory typed KV tier.
Import
Section titled “Import”import { memoryKv } from "@graphrefly/ts/storage";Signature
Section titled “Signature”function memoryKv(codec: Codec<T> = jsonCodecFor<T>()): KvStorageTier<T>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
codec | Codec<T> | Codec used to encode and decode stored values. |
Returns
Section titled “Returns”A KvStorageTier<T> value.
Example
Section titled “Example”import { memoryKv } from "@graphrefly/ts/storage";Source
Section titled “Source”packages/ts/src/storage/kv.ts