@varasto/fs-storage
Version:
Varasto storage implementation that stores data to hard disk
7 lines (6 loc) • 512 B
TypeScript
/// <reference types="node" />
import { JsonObject } from 'type-fest';
export declare const createNamespace: (dir: string, namespace: string) => Promise<void>;
export declare const buildFilename: (dir: string, namespace: string, key: string) => string;
export declare const globNamespace: (dir: string, namespace: string) => Promise<string[]>;
export declare const readItem: <T extends JsonObject>(filename: string, encoding: BufferEncoding, deserialize: (data: string) => JsonObject) => Promise<T | undefined>;