UNPKG

@sumcode/svgify

Version:

A lightweight React component designed to dynamically render and style SVG icons.

14 lines (13 loc) 581 B
/** * Simple Cache Storage wrapper for SVG icons. * Provides get, set and cleanup with configurable limits. */ export declare const CACHE_NAME = "svgify-cache"; export declare const MAX_CACHE_ENTRIES = 50; export declare const MAX_CACHE_AGE_MS: number; /** Get cached SVG string for a key */ export declare function getCachedSvg(key: string): Promise<string | null>; /** Store SVG string in cache */ export declare function setCachedSvg(key: string, svg: string): Promise<void>; /** Remove old entries to respect limits */ export declare function cleanupCache(): Promise<void>;