UNPKG

iconly

Version:

Iconly is designed to load and cache SVG icons in the browser, using IndexedDB to store the data. It retrieves the icons from a given SVG file, stores them in IndexedDB, and inserts them into the DOM for easy access and use.

26 lines (25 loc) 588 B
export interface IconlyOptions { file?: string; version?: string; debug?: boolean; container?: string | HTMLElement; } export interface IconRecord { version: string; data: string; } declare class Iconly { private static dbInstance; private readonly options; private readonly container; constructor(options?: IconlyOptions); private openDB; private getIconStore; private static fetchData; private insert; init(): Promise<void>; private createErrorMessage; private logDebug; private logError; } export default Iconly;