( link: Link | LinkIncludingShortenedCollectionAndTags, format: "image" | "pdf" | "readable" | "monolith" | "preview" )
| 2 | import { Link } from "@linkwarden/prisma/client"; |
| 3 | |
| 4 | export function formatAvailable( |
| 5 | link: Link | LinkIncludingShortenedCollectionAndTags, |
| 6 | format: "image" | "pdf" | "readable" | "monolith" | "preview" |
| 7 | ) { |
| 8 | return Boolean(link && link[format] && link[format] !== "unavailable"); |
| 9 | } |
| 10 | |
| 11 | export const atLeastOneFormatAvailable = ( |
| 12 | link: Link | LinkIncludingShortenedCollectionAndTags |
no outgoing calls
no test coverage detected