UNPKG

eze-link

Version:
21 lines (20 loc) 787 B
export default class Storable { storage: Storage; storeKey: string; set: (store_key: string, data: any) => void; get: (store_key: string) => any; insert: (key: string, value: Array<any> | Object) => void; remove: (store_key: string) => void; clear: (storageKey?: string) => void; select: (key: string, value: any) => any; private getCleanString; constructor({ storage, storeKey }: StorableConstructor); static clear: (storage: "localStorage" | "sessionStorage", storageKey: string) => void; } type StorageType = "localStorage" | "sessionStorage" | "memoryStorage" | Storage; type StorableConstructor = { storage?: StorageType; storeKey?: string; }; export type IStorable = InstanceType<typeof Storable>; export {};