UNPKG

@sparta-utils/cache-util

Version:

统一的浏览器缓存工具类,支持 localStorage、sessionStorage、memory、cookie、indexedDB,内置 SM2 加密与过期机制。A unified browser caching utility supporting localStorage, sessionStorage, memory, cookie, indexedDB with SM2 encryption and expiration.

16 lines (15 loc) 370 B
/** * sessionStorage.ts * 功能与 localStorage 模块一致,仅存储方式不同 */ interface Options { expire?: number; encrypt?: boolean; } declare const _default: { set(key: string, value: any, options?: Options): boolean; get(key: string, options?: Options): any; remove(key: string): void; clear(): void; }; export default _default;