UNPKG

@selfcommunity/utils

Version:

Utilities to integrate a Community.

34 lines (33 loc) 715 B
/** * Manage window.localStorage */ export declare class LocalStorageDB { /** * Set a key in window.localStorage * @param key * @param value */ static set(key: any, value: any): void; /** * Get a key from window.localStorage, else return null * @param key */ static get(key: any): any; /** * Get all keys */ static getAll(): any[]; /** * Remove a single item from window.localStorage * @param key */ static remove(key: any): void; /** * Clear all keys from window.localStorage */ static clearAll(): void; /** * Check if localStorage is supported */ static checkifSupport(): boolean; }