export function blobDownload ( body , options , filename ) { const blob = new Blob ( [ body ] , options ) ; if ( navigator . msSaveBlob ) { navigator . msSaveBlob ( blob , filename ) ; } else { const link = document . createElement ( 'a' ) ; if ( link . download !== undefined ) { const url = URL . createObjectURL ( blob ) ; link . setAttribute ( 'href' , url ) ; link . setAttribute ( 'download' , filename ) ; link . style . visibility = 'hidden' ; document . body . appendChild ( link ) ; link . click ( ) ; document . body . removeChild ( link ) ; } } }