umbrella-storage
Version:
umbrella of localStorage & sessionStorage
10 lines (9 loc) • 440 B
TypeScript
declare type TstorageType = 'localStorage' | 'sessionStorage';
declare class storage {
static prefix: string;
static setStorage(storageType: TstorageType, key: string, value: any): void;
static getStorage(storageType: TstorageType, key: string, withoutParse?: boolean): any;
static removeStorage(storageType: TstorageType, key: string): void;
static transformKey(key: string): string;
}
export default storage;