Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

file-saver

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-saver - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

dist/FileSaver.js

18

package.json
{
"name": "file-saver",
"version": "1.3.3",
"version": "1.3.4",
"description": "An HTML5 saveAs() FileSaver implementation",
"main": "FileSaver.js",
"main": "dist/FileSaver.js",
"module": "src/FileSaver.js",
"files": [
"dist/FileSaver.min.js"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0",
"build": "node_modules/.bin/uglifyjs FileSaver.js --mangle --comments /@source/ > FileSaver.min.js"
"build:development": "mkdir -p dist && babel src/FileSaver.js --out-file=dist/FileSaver.js",
"build:production": "NODE_ENV=production npm run build:development -- --out-file=dist/FileSaver.min.js",
"build": "npm run build:development && npm run build:production",
"prepublishOnly": "npm run build"
},

@@ -26,4 +33,7 @@ "repository": {

"devDependencies": {
"uglify-js": "^2.6.2"
"babel-cli": "^6.26.0",
"babel-plugin-transform-es2015-modules-umd": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-minify": "^0.2.0"
}
}

@@ -35,2 +35,3 @@ If you need to save really large files bigger then the blob's size limitation or don't have

| Safari < 6 | data: URI | No | n/a | [Blob.js](https://github.com/eligrey/Blob.js) |
| Safari 10.1+   | Blob         | Yes         | n/a           | None |

@@ -71,2 +72,9 @@ Feature detection is possible:

### Saving text using require
```js
var FileSaver = require('file-saver');
var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
FileSaver.saveAs(blob, "hello world.txt");
```
### Saving text

@@ -76,3 +84,3 @@

var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
saveAs(blob, "hello world.txt");
FileSaver.saveAs(blob, "hello world.txt");
```

@@ -105,3 +113,3 @@

var file = new File(["Hello, world!"], "hello world.txt", {type: "text/plain;charset=utf-8"});
saveAs(file);
FileSaver.saveAs(file);
```

@@ -120,15 +128,2 @@

Contributing
------------
The `FileSaver.js` distribution file is compiled with Uglify.js like so:
```bash
uglifyjs FileSaver.js --mangle --comments /@source/ > FileSaver.min.js
# or simply:
npm run build
```
Please make sure you build a production version before submitting a pull request.
Installation

@@ -141,1 +136,7 @@ ------------------

```
Additionally, TypeScript definitions can be installed via:
```bash
npm install @types/file-saver --save-dev
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc