num-beauty
Version:
An ultra lightweight module for formatting numbers into human-friendly strings
11 lines (10 loc) • 324 B
TypeScript
declare class MemoryCache {
private cache;
set<T>(key: string, value: T, ttl?: number): void;
get<T>(key: string): T | undefined;
delete(key: string): void;
clear(): void;
getOrSet<T>(key: string, fn: () => Promise<T>, ttl?: number): Promise<T>;
}
export declare const cache: MemoryCache;
export {};