We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 431da63 + 8a2b1cf commit a186749Copy full SHA for a186749
file-download.js
@@ -1,5 +1,6 @@
1
-module.exports = function(data, filename, mime) {
2
- var blob = new Blob([data], {type: mime || 'application/octet-stream'});
+module.exports = function(data, filename, mime, bom = null) {
+ var blobData = (bom) ? [bom, data] : [data]
3
+ var blob = new Blob(blobData, {type: mime || 'application/octet-stream'});
4
if (typeof window.navigator.msSaveBlob !== 'undefined') {
5
// IE workaround for "HTML7007: One or more blob URLs were
6
// revoked by closing the blob for which they were created.
0 commit comments