node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »


browser support

#browsersavefile ##browsersavefile(fileName, blob) browsersavefile will take a file name and a Blob object. It will then download the file from the users browser.


  • fileName String - The file name of the file you'd like to save as
  • blob Blob - File you'd like to save out


var browsersavefile = require( 'browsersavefile' );
var someHTML = [ '<div>HELLO WORLD</div>' ],
    blobData = new Blob( someHTML, {type : 'text/html'});
browsersavefile( 'my file', blobData );