UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

2 lines (1 loc) 487 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=(r,c)=>{const t=URL.createObjectURL(r),e=document.createElement("a");e.href=t,e.download=c,e.click(),URL.revokeObjectURL(t)},d=(r,c="",t=512)=>{const e=atob(r),s=[];for(let o=0;o<e.length;o+=t){const l=e.slice(o,o+t),a=new Array(l.length);for(let n=0;n<l.length;n++)a[n]=l.charCodeAt(n);const b=new Uint8Array(a);s.push(b)}return new Blob(s,{type:c})};exports.base64ToBlob=d;exports.downloadFile=y;