react-phylogeny-tree-gl
Version:
React integration of phylocanvas.gl. Component and hook for phylogenetic tree visualistion.
14 lines • 562 B
JavaScript
export function download(dataURL, filename = 'file') {
const anchorElement = document.createElement('a');
anchorElement.download = filename;
anchorElement.href = dataURL;
document.body.appendChild(anchorElement);
anchorElement.click();
document.body.removeChild(anchorElement);
}
export function createBlobURL(data, type = 'text/plain;charset=utf-8') {
const blob = new Blob([data], { type });
const windowURL = window.URL || window.webkitURL;
return windowURL.createObjectURL(blob);
}
//# sourceMappingURL=fileDownload.js.map