* chore(release): v5.1.0

* feat: implement resume thumbnails

* fix: remove unused mcp tools

* docs: fix formatting of docs
This commit is contained in:
Amruth Pillai
2026-05-07 15:12:33 +02:00
committed by GitHub
parent 51c366310e
commit 50ba37a27f
1015 changed files with 106087 additions and 141872 deletions
+28
View File
@@ -0,0 +1,28 @@
import { slugify } from "./string";
export function generateFilename(prefix: string, extension?: string) {
const name = slugify(prefix);
return `${name}${extension ? `.${extension}` : ""}`;
}
export function downloadWithAnchor(blob: Blob, filename: string) {
const a = document.createElement("a");
const url = URL.createObjectURL(blob);
a.href = url;
a.rel = "noopener";
a.download = filename;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
setTimeout(() => URL.revokeObjectURL(url), 5000);
}
export async function downloadFromUrl(url: string, filename: string) {
const response = await fetch(url);
const blob = await response.blob();
downloadWithAnchor(blob, filename);
}