file-saver
Advanced tools
Comparing version 1.3.4 to 1.3.8
{ | ||
"name": "file-saver", | ||
"version": "1.3.4", | ||
"description": "An HTML5 saveAs() FileSaver implementation", | ||
"main": "dist/FileSaver.js", | ||
"module": "src/FileSaver.js", | ||
"files": [ | ||
"dist/FileSaver.min.js" | ||
"_from": "file-saver@1.3.3", | ||
"_id": "file-saver@1.3.3", | ||
"_inBundle": false, | ||
"_integrity": "sha1-zdTETTqiZOrC9o7BZbx5HDSvEjI=", | ||
"_location": "/file-saver", | ||
"_phantomChildren": {}, | ||
"_requested": { | ||
"type": "version", | ||
"registry": true, | ||
"raw": "file-saver@1.3.3", | ||
"name": "file-saver", | ||
"escapedName": "file-saver", | ||
"rawSpec": "1.3.3", | ||
"saveSpec": null, | ||
"fetchSpec": "1.3.3" | ||
}, | ||
"_requiredBy": [ | ||
"#USER", | ||
"/" | ||
], | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 0", | ||
"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" | ||
"_resolved": "https://registry.npmjs.org/file-saver/-/file-saver-1.3.3.tgz", | ||
"_shasum": "cdd4c44d3aa264eac2f68ec165bc791c34af1232", | ||
"_spec": "file-saver@1.3.3", | ||
"_where": "/Users/jimmywarting/git/FileSaver.js", | ||
"author": { | ||
"name": "Eli Grey", | ||
"email": "me@eligrey.com" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/eligrey/FileSaver.js" | ||
"bugs": { | ||
"url": "https://github.com/eligrey/FileSaver.js/issues" | ||
}, | ||
"bundleDependencies": false, | ||
"deprecated": false, | ||
"description": "An HTML5 saveAs() FileSaver implementation", | ||
"devDependencies": { | ||
"uglify-js": "^2.6.2" | ||
}, | ||
"homepage": "https://github.com/eligrey/FileSaver.js#readme", | ||
"keywords": [ | ||
@@ -26,14 +45,14 @@ "filesaver", | ||
], | ||
"author": "Eli Grey <me@eligrey.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/eligrey/FileSaver.js/issues" | ||
"main": "FileSaver.js", | ||
"name": "file-saver", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/eligrey/FileSaver.js.git" | ||
}, | ||
"homepage": "https://github.com/eligrey/FileSaver.js#readme", | ||
"devDependencies": { | ||
"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" | ||
} | ||
"scripts": { | ||
"build": "uglifyjs FileSaver.js --mangle --comments /@source/ > FileSaver.min.js", | ||
"test": "echo \"Error: no test specified\" && exit 0" | ||
}, | ||
"version": "1.3.8" | ||
} |
@@ -35,3 +35,2 @@ 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 | | ||
@@ -72,9 +71,2 @@ 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 | ||
@@ -84,3 +76,3 @@ | ||
var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"}); | ||
FileSaver.saveAs(blob, "hello world.txt"); | ||
saveAs(blob, "hello world.txt"); | ||
``` | ||
@@ -113,3 +105,3 @@ | ||
var file = new File(["Hello, world!"], "hello world.txt", {type: "text/plain;charset=utf-8"}); | ||
FileSaver.saveAs(file); | ||
saveAs(file); | ||
``` | ||
@@ -128,2 +120,15 @@ | ||
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 | ||
@@ -136,7 +141,1 @@ ------------------ | ||
``` | ||
Additionally, TypeScript definitions can be installed via: | ||
```bash | ||
npm install @types/file-saver --save-dev | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
29861
1
11
460
0
136