GraphReFlyTS

API Reference

fileKv()

Create a typed KV tier over a Node filesystem backend (D106 passive storage).

Import

import { fileKv } from "@graphrefly/ts/storage/node";

Signature

function fileKv(
	dir: string,
	opts: FileKvOptions<T> = {},
): KvStorageTier<T>

Parameters

ParameterTypeDescription
dirstringdir value used by the helper.
optsFileKvOptions<T>Options that configure the helper.

Returns

A KvStorageTier<T> value.

Example

import { fileKv } from "@graphrefly/ts/storage/node";

Source

packages/ts/src/storage/node.ts