Skip to content

@xtandard/flags/storage/file

File-system storage: createFileStorage keeps each key as a JSON file under a directory (node:fs, Bun and Node), with change notifications. For local development and drafts kept in version control.

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

import { … } from "@xtandard/flags/storage/file";
Name Summary
createFileStorage Create a file-backed FileFlagsStorage. watch is implemented via fs.watch on the base directory (recursive); it is best-effort and may coalesce or miss events on platforms without recursive-watch support.
Name Summary
FileFlagsStorage A watchable, compare-and-swap capable file-backed storage.
FileStorageOptions Options for createFileStorage. legacy defaults to "read-through".