Spaces:
Running
Running
Download client/modules/imageResultKey.ts from Felladrin/MiniSearch: direct link, hf CLI and curl.
- Browser
- Download file 352 Bytes
-
https://huggingface.co/spaces/Felladrin/MiniSearch/resolve/main/client/modules/imageResultKey.ts
- Command line
-
hf download hf://spaces/Felladrin/MiniSearch/client/modules/imageResultKey.ts
-
curl -L -o imageResultKey.ts https://huggingface.co/spaces/Felladrin/MiniSearch/resolve/main/client/modules/imageResultKey.ts
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; | |
| } | |