persist-ui
Version:
Universal input persistence for Vanilla, React, Vue, Astro, Next.js etc. with secure AES encryption.
20 lines (19 loc) • 526 B
TypeScript
type PersistUIOptions = {
key: string;
debounce?: number;
encrypt?: boolean;
encryptionSecret?: string;
ignoreTypes?: string[];
resetSelector?: string;
onRestore?: (data: Record<string, any>) => void;
clearOnSubmit?: boolean;
submitSelector?: string;
};
export declare let persistUI: {
attach(selectors: string | string[] | HTMLElement | HTMLElement[], options: PersistUIOptions): {
save: () => void;
restore: () => void;
reset: () => void;
};
};
export {};