UNPKG

cache2

Version:

一个简单的 JavaScript 缓存管理,支持浏览器端和 node 端。

12 lines (11 loc) 299 B
type Key = string | symbol; declare class MemoryStorage { private scope; data: Record<string, any>; constructor(scope?: Key); getItem(key: string): any; setItem(key: string, value: any): void; removeItem(key: string): void; clear(): void; } export default MemoryStorage;