mirror of
https://github.com/linkwarden/linkwarden.git
synced 2026-07-01 08:16:26 +00:00
19 lines
467 B
TypeScript
19 lines
467 B
TypeScript
import { ArchivedFormat } from "@linkwarden/types";
|
|
|
|
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;
|
|
}
|
|
}
|