kv-storage
Version:
💾 Create data storage that uses a simple key-value method for Node, Browser, Deno, Bun, Cloudflare Workers
17 lines (16 loc) • 524 B
TypeScript
export declare class KVStorageModule {
_storageDir: string;
private constructor();
private isAlphanumeric;
private showError;
static init({ dataDirName, storageName }: {
dataDirName?: string;
storageName: string;
}): Promise<KVStorageModule>;
put(key: string, value: string): Promise<unknown>;
get(key: string): Promise<unknown>;
delete(key: string): Promise<unknown>;
has(key: string): Promise<unknown>;
list(): Promise<unknown>;
clear(): Promise<unknown>;
}