vitepress-plugin-llms
Version:
📜 A VitePress plugin for generating LLM-friendly documentation
20 lines (18 loc) • 505 B
JavaScript
// Built with bunup (https://bunup.dev)
import {
cleanUrl
} from "../shared/chunk-8kwyv1sq.js";
// src/vitepress-components/utils.ts
function downloadFile(filename, content, blobType = "text/plain") {
const blob = content instanceof Blob ? content : new Blob([content], { type: blobType });
const url = URL.createObjectURL(blob);
Object.assign(document.createElement("a"), {
href: url,
download: filename
}).click();
URL.revokeObjectURL(url);
}
export {
downloadFile,
cleanUrl
};