MCPcopy Create free account
hub / github.com/Sagyam/linite / downloadScript

Function downloadScript

src/lib/script-generator.ts:231–241  ·  view source on GitHub ↗
(content: string, filename: string, )

Source from the content-addressed store, hash-verified

229 * Helper function to download a script file
230 */
231export function downloadScript(content: string, filename: string, ): void {
232 const blob = new Blob([content], { type: 'text/plain' });
233 const url = URL.createObjectURL(blob);
234 const a = document.createElement('a');
235 a.href = url;
236 a.download = filename;
237 document.body.appendChild(a);
238 a.click();
239 document.body.removeChild(a);
240 URL.revokeObjectURL(url);
241}

Callers 3

handleDownloadFunction · 0.90
handleDownloadUninstallFunction · 0.90
handleDownloadFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected