MiniSearch / client /modules /imageResultKey.ts
system's picture
system HF Staff
Sync from felladrin/MiniSearch@ebacf26
59291d5 verified
Raw History Blame Contribute Delete
352 Bytes
import type { ImageSearchResult } from "./types";
/**
* Identifies an image result by its full-size source, falling back to the
* thumbnail. The page URL is not enough: one gallery page holds many images.
*/
export function imageResultKey([
,
,
thumbnailUrl,
sourceUrl,
]: ImageSearchResult): string {
return sourceUrl || thumbnailUrl;
}