Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

474 B
Raw Blame
import { ArchivedFormat } from "@linkwarden/types/global";

export default function getSuffixFromFormat(format: number): string | null {
  switch (format) {
    case ArchivedFormat.png:
      return ".png";
    case ArchivedFormat.jpeg:
      return ".jpeg";
    case ArchivedFormat.pdf:
      return ".pdf";
    case ArchivedFormat.readability:
      return "_readability.json";
    case ArchivedFormat.monolith:
      return ".html";
    default:
      return null;
  }
}