UNPKG

nodejs-file-utils

Version:

File Read and Write Apis with Cached content in NodeJs

7 lines (6 loc) 403 B
declare type Reader<T> = (path: string) => Promise<T>; declare type Writer<T> = (path: string, data: T) => Promise<void>; export declare const readFileStore: <T>(path: string, reader: Reader<T>, force?: boolean) => Promise<T>; export declare const updateFileStore: <T>(path: string, data: T) => void; export declare const saveFileStore: <T>(path: string, writer: Writer<T>) => Promise<void>; export {};