API Reference
Manifest Helpers
Use createManifest() and writeManifest() to persist many BlurResult entries.
When to use
Section titled “When to use”Use manifest helpers when you precompute placeholders and need one stable JSON file for runtime lookup.
Example
Section titled “Example”import { createManifest, writeManifest } from 'blurkit'
const manifest = createManifest({ '/images/hero.jpg': result,})
await writeManifest('./blur-manifest.json', manifest, { pretty: true })Inputs / Options / Behavior
Section titled “Inputs / Options / Behavior”createManifest(images: Record<string, BlurResult>): BlurManifestwriteManifest(filePath: string, manifest: BlurManifest, options?: { pretty?: boolean }): Promise<void>
interface BlurManifest { version: 1 algorithm?: 'blurhash' | 'thumbhash' | 'mixed' generatedAt: string images: Record<string, BlurResult>}createManifest()infersalgorithmas single value ormixed.writeManifest()creates parent directories and writes UTF-8 JSON.
Limits / Caveats
Section titled “Limits / Caveats”- Path key strategy is chosen by caller when creating
imagesmap. - Manifest helpers do not validate downstream URL conventions.