🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-file-download

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-file-download - npm Package Compare versions

Comparing version

to
0.3.3

8

file-download.js
var React = require('react');
module.exports = function(data, filename) {
var blob = new Blob([data], {type: 'text/csv'});
module.exports = function(data, filename, mime) {
var blob = new Blob([data], {type: mime || 'application/octet-stream'});
if (typeof window.navigator.msSaveBlob !== 'undefined') {

@@ -13,5 +13,5 @@ // IE workaround for "HTML7007: One or more blob URLs were

else {
var csvURL = window.URL.createObjectURL(blob);
var blobURL = window.URL.createObjectURL(blob);
var tempLink = document.createElement('a');
tempLink.href = csvURL;
tempLink.href = blobURL;
tempLink.setAttribute('download', filename);

@@ -18,0 +18,0 @@ tempLink.setAttribute('target', '_blank');

{
"name": "react-file-download",
"version": "0.3.2",
"version": "0.3.3",
"description": "React component that trigger browser to save javascript-generated content to a file",

@@ -9,5 +9,8 @@ "main": "file-download.js",

},
"dependencies": {
"devDependencies": {
"react": "^0.14.7"
},
"peerDependencies": {
"react": "^0.14.7 || ^0.15.0"
},
"repository": {

@@ -14,0 +17,0 @@ "type": "git",