UNPKG

web-shared-preferences-fs-pollyfill

Version:

Pollyfill to use SharedPreferences outside of browsers

18 lines (17 loc) 555 B
import { Storage, TempLocalStorage } from "web-shared-preferences"; export declare type Path = `${string}.json`; /** * Pollyfill to use SharedPreferences outside of browsers */ export declare class SharedPreferencesFsPollyfill extends TempLocalStorage implements Storage { private path; constructor(path: Path); private loadFile; private writeData; getItem(key: string): any; setItem(key: string, value: string): void; removeItem(key: string): void; clear(): void; key(i: number): string; get length(): number; }