@openscript/unplugin-favicons
Version:
Generate favicons for your project with caching for blazing fast rebuilds.
21 lines • 732 B
TypeScript
type SsriData = Buffer | DataView | NodeJS.TypedArray | string;
interface CacheOptions {
logLabel?: string;
}
/**
* Returns the SHA-256 hash of the provided value.
*/
export declare const computeKey: (data: SsriData) => string;
/**
* Intended use: pass in raw file contents as key.
* Use integrity SHA as internal key.
* Return value if exists.
*/
export declare const get: (key: SsriData, { logLabel }: CacheOptions) => Promise<Buffer | undefined>;
/**
* Pass in source file contents as key. Get FaviconsResponse as value.
* Internally use sha integrity to compute key.
*/
export declare const put: (key: SsriData, data: any, { logLabel }: CacheOptions) => Promise<void>;
export {};
//# sourceMappingURL=cache.d.ts.map