{"_id":"file-saverjs","_rev":"7-6cc4e84fa8c9b5d23062020d13398b13","name":"file-saverjs","description":"An HTML5 saveAs() FileSaver implementation","dist-tags":{"latest":"1.3.6"},"versions":{"1.0.0":{"name":"file-saverjs","version":"1.0.0","description":"An HTML5 saveAs() FileSaver implementation","main":"FileSaver.js","scripts":{"test":"exit 0","build":"uglifyjs FileSaver.js --mangle --comments '/^!|@preserve|@license|@cc_on/i' > FileSaver.min.js"},"repository":{"type":"git","url":"git+https://github.com/clarketm/FileSaver.js.git"},"keywords":["filesaver","saveas","blob"],"authors":["clarketm <travis.m.clarke@gmail.com>","eligrey <~@eligrey.com>"],"license":"MIT","bugs":{"url":"https://github.com/clarketm/FileSaver.js/issues"},"homepage":"https://github.com/clarketm/FileSaver.js#readme","devDependencies":{"uglify-js":"^2.7.4"},"gitHead":"1bd9bf989bd5402abded9b20f756be956aa4a36a","_id":"file-saverjs@1.0.0","_shasum":"5e2767f0b1e286b8a29fba12ff257f054efbfa57","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.5.0","_npmUser":{"name":"clarketm","email":"travis.m.clarke@gmail.com"},"dist":{"shasum":"5e2767f0b1e286b8a29fba12ff257f054efbfa57","tarball":"https://registry.npmjs.org/file-saverjs/-/file-saverjs-1.0.0.tgz","integrity":"sha512-HVYA4OTX6GP1Rg5DpwzR21GvOqTi4+xdBl89jcbeDQQT7xFHOyXic3KwVGhsRxwESYBMo4KkrwcmcsniYGEujg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDO8Nh7dfNeDBNzbPf5K36kMeNzLTMGJX93gF7MLnkCtwIgIQLqcSwZDjDp9GgApWJEKecbPbKIfcKfZJO9zLBykPQ="}]},"maintainers":[{"name":"clarketm","email":"travis.m.clarke@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/file-saverjs-1.0.0.tgz_1480141580104_0.21317129768431187"}},"1.3.4":{"name":"file-saverjs","version":"1.3.4","description":"An HTML5 saveAs() FileSaver implementation","main":"FileSaver.js","scripts":{"test":"exit 0","build":"uglifyjs FileSaver.js --mangle --comments '/^!|@preserve|@license|@cc_on/i' > FileSaver.min.js"},"repository":{"type":"git","url":"git+https://github.com/clarketm/FileSaver.js.git"},"keywords":["filesaver","saveas","blob"],"authors":["clarketm <travis.m.clarke@gmail.com>","eligrey <~@eligrey.com>"],"license":"MIT","bugs":{"url":"https://github.com/clarketm/FileSaver.js/issues"},"homepage":"https://github.com/clarketm/FileSaver.js#readme","devDependencies":{"uglify-js":"^2.7.4"},"gitHead":"49950720752845865622423e8405ecbe871539d9","_id":"file-saverjs@1.3.4","_shasum":"d67eafde7a8636ad320aad7ca577c81635ef1bed","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.5.0","_npmUser":{"name":"clarketm","email":"travis.m.clarke@gmail.com"},"dist":{"shasum":"d67eafde7a8636ad320aad7ca577c81635ef1bed","tarball":"https://registry.npmjs.org/file-saverjs/-/file-saverjs-1.3.4.tgz","integrity":"sha512-QcBT+raTtm+0k7cAB2TD2BeQo3TTDNZ3Gi734UilHMxgTAyUaJqX3js48puY8BOUQCo/deSjx1WnbmYxm+6g2w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqhDci1gIUok+kjlfdBKyerW3Up6gnrxMvP4SAoU+EYgIgRDllJqiNZz5SYddwp6qy0kHL3ct1IesSmy3+i7vSXHw="}]},"maintainers":[{"name":"clarketm","email":"travis.m.clarke@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/file-saverjs-1.3.4.tgz_1480141636052_0.826336145401001"}},"1.3.5":{"name":"file-saverjs","version":"1.3.5","description":"An HTML5 saveAs() FileSaver implementation","main":"FileSaver.js","scripts":{"test":"exit 0","build":"uglifyjs FileSaver.js --mangle --comments '/^!|@preserve|@license|@cc_on/i' > FileSaver.min.js"},"repository":{"type":"git","url":"git+https://github.com/clarketm/FileSaver.js.git"},"keywords":["filesaver","saveas","blob"],"authors":["clarketm <travis.m.clarke@gmail.com>","eligrey <~@eligrey.com>"],"license":"MIT","bugs":{"url":"https://github.com/clarketm/FileSaver.js/issues"},"homepage":"https://github.com/clarketm/FileSaver.js#readme","devDependencies":{"uglify-js":"^2.7.4"},"gitHead":"e241bd15288553341b3629f5d1e0bc7aaa8a7a38","_id":"file-saverjs@1.3.5","_shasum":"9d1345d2335fbe6a98a58e4247ed5cab4c50c5fd","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.5.0","_npmUser":{"name":"clarketm","email":"travis.m.clarke@gmail.com"},"dist":{"shasum":"9d1345d2335fbe6a98a58e4247ed5cab4c50c5fd","tarball":"https://registry.npmjs.org/file-saverjs/-/file-saverjs-1.3.5.tgz","integrity":"sha512-9e7p4o4XY3FvO4tt5uNPFX6TYi2AEu6DwKCc8L7H0IW3eS9KoPlNCXxBYtLOzcxR/NLkNyLvfIHF0SfUEuC3Lg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0hYtIzVnWaRIMU4m68pNbKc0ojrT/6aeUAjR6yvdyigIhAKwGGLcl7Fc1RqtPS3gRwxkaGalRP8T/6xM9EnJiW4Ur"}]},"maintainers":[{"name":"clarketm","email":"travis.m.clarke@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/file-saverjs-1.3.5.tgz_1480155187854_0.10899857664480805"}},"1.3.6":{"name":"file-saverjs","version":"1.3.6","description":"An HTML5 saveAs() FileSaver implementation","main":"FileSaver.js","scripts":{"test":"exit 0","build":"uglifyjs FileSaver.js --mangle --comments '/^!|@preserve|@license|@cc_on/i' > FileSaver.min.js"},"repository":{"type":"git","url":"git+https://github.com/clarketm/FileSaver.js.git"},"keywords":["filesaver","saveas","blob"],"authors":["clarketm <travis.m.clarke@gmail.com>","eligrey <~@eligrey.com>"],"license":"MIT","bugs":{"url":"https://github.com/clarketm/FileSaver.js/issues"},"homepage":"https://github.com/clarketm/FileSaver.js#readme","devDependencies":{"uglify-js":"^2.7.4"},"gitHead":"70e4ea24c58e5949d7db909af6e10f4e05adcbab","_id":"file-saverjs@1.3.6","_shasum":"b7a454e126f56cf71fcb70159b8356142654e78e","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"clarketm","email":"travis.m.clarke@gmail.com"},"dist":{"shasum":"b7a454e126f56cf71fcb70159b8356142654e78e","tarball":"https://registry.npmjs.org/file-saverjs/-/file-saverjs-1.3.6.tgz","integrity":"sha512-b8Re91Mmhc2i2wRGEhzeBp3Mbv+y/+uZt6Ty5Fld9LNDxS3bzESyvB0a4WTBk8U4vznmFaD5sQtBR90L6W6a0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDPPtwoIJkXEDnetJo5jdUaAm78iF524kFvBA6Ep6EfAIgXF6RRnmI7LoSaW3sElgT+S71BPFJO4HhUz/9ATRlqgI="}]},"maintainers":[{"name":"clarketm","email":"travis.m.clarke@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/file-saverjs-1.3.6.tgz_1493714273811_0.5952072271611542"}}},"readme":"If you need to save really large files bigger then the blob's size limitation or don't have \nenough RAM, then have a look at the more advanced [StreamSaver.js](https://github.com/jimmywarting/StreamSaver.js)\nthat can save data directly to the hard drive asynchronously with the power of the new streams API. That will have\nsupport for progress, cancelation and knowing when it's done writing\n\nFileSaver.js\n============\n\nFileSaver.js implements the `saveAs()` FileSaver interface in browsers that do\nnot natively support it. There is a [FileSaver.js demo][1] that demonstrates saving\nvarious media types.\n\nFileSaver.js is the solution to saving files on the client-side, and is perfect for\nwebapps that need to generate files, or for saving sensitive information that shouldn't be\nsent to an external server.\n\nLooking for `canvas.toBlob()` for saving canvases? Check out\n[canvas-toBlob.js][2] for a cross-browser implementation.\n\nInstallation\n------------------\n### npm\n```bash\n$ npm install file-saverjs\n```\n\n### bower\n```bash\n$ bower install file-saverjs\n```\n\n\nSupported browsers\n------------------\n\n| Browser        | Constructs as | Filenames    | Max Blob Size | Dependencies |\n| -------------- | ------------- | ------------ | ------------- | ------------ |\n| Firefox 20+    | Blob          | Yes          | 800 MiB       | None         |\n| Firefox < 20   | data: URI     | No           | n/a           | [Blob.js](https://github.com/eligrey/Blob.js) |\n| Chrome         | Blob          | Yes          | [500 MiB][3]  | None         |\n| Chrome for Android | Blob      | Yes          | [500 MiB][3]  | None         |\n| Edge           | Blob          | Yes          | ?             | None         |\n| IE 10+         | Blob          | Yes          | 600 MiB       | None         |\n| Opera 15+      | Blob          | Yes          | 500 MiB       | None         |\n| Opera < 15     | data: URI     | No           | n/a           | [Blob.js](https://github.com/eligrey/Blob.js) |\n| Safari 6.1+*   | Blob          | No           | ?             | None         |\n| Safari < 6     | data: URI     | No           | n/a           | [Blob.js](https://github.com/eligrey/Blob.js) |\n\nFeature detection is possible:\n\n```js\ntry {\n    var isFileSaverSupported = !!new Blob;\n} catch (e) {}\n```\n\n### IE < 10\n\nIt is possible to save text files in IE < 10 without Flash-based polyfills.\nSee [ChenWenBrian and koffsyrup's `saveTextAs()`](https://github.com/koffsyrup/FileSaver.js#examples) for more details.\n\n### Safari 6.1+\n\nBlobs may be opened instead of saved sometimes—you may have to direct your Safari users to manually\npress <kbd>⌘</kbd>+<kbd>S</kbd> to save the file after it is opened. Using the `application/octet-stream` MIME type to force downloads [can cause issues in Safari](https://github.com/eligrey/FileSaver.js/issues/12#issuecomment-47247096).\n\n### iOS\n\nsaveAs must be run within a user interaction event such as onTouchDown or onClick; setTimeout will prevent saveAs from triggering. Due to restrictions in iOS saveAs opens in a new window instead of downloading, if you want this fixed please [tell Apple](https://bugs.webkit.org/show_bug.cgi?id=102914) how this bug is affecting you.\n\nSyntax\n------\n\n```js\nFileSaver saveAs(Blob/File data, optional DOMString filename, optional Boolean disableAutoBOM)\n```\n\nPass `true` for `disableAutoBOM` if you don't want FileSaver.js to automatically provide Unicode text encoding hints (see: [byte order mark](https://en.wikipedia.org/wiki/Byte_order_mark)).\n\nExamples\n--------\n\n### Saving text using with require\n```js\nvar FileSaver = require('file-saver');\nvar blob = new Blob([\"Hello, world!\"], {type: \"text/plain;charset=utf-8\"});\nFileSaver.saveAs(blob, \"hello world.txt\");\n```\n\n### Saving text\n\n```js\nvar blob = new Blob([\"Hello, world!\"], {type: \"text/plain;charset=utf-8\"});\nsaveAs(blob, \"hello world.txt\");\n```\n\nThe standard W3C File API [`Blob`][4] interface is not available in all browsers.\n[Blob.js][5] is a cross-browser `Blob` implementation that solves this.\n\n### Saving a canvas\n\n```js\nvar canvas = document.getElementById(\"my-canvas\"), ctx = canvas.getContext(\"2d\");\n// draw to canvas...\ncanvas.toBlob(function(blob) {\n    saveAs(blob, \"pretty image.png\");\n});\n```\n\nNote: The standard HTML5 `canvas.toBlob()` method is not available in all browsers.\n[canvas-toBlob.js][6] is a cross-browser `canvas.toBlob()` that polyfills this.\n\n### Saving File\n\nYou can save a File constructor without specifying a filename. The\nFile itself already contains a name, There is a hand full of ways to get a file\ninstance (from storage, file input, new constructor)\nBut if you still want to change the name, then you can change it in the 2nd argument\n\n```js\nvar file = new File([\"Hello, world!\"], \"hello world.txt\", {type: \"text/plain;charset=utf-8\"});\nsaveAs(file);\n```\n\n\n\n![Tracking image](https://in.getclicky.com/212712ns.gif)\n\n  [1]: http://eligrey.com/demos/FileSaver.js/\n  [2]: https://github.com/eligrey/canvas-toBlob.js\n  [3]: https://code.google.com/p/chromium/issues/detail?id=375297\n  [4]: https://developer.mozilla.org/en-US/docs/DOM/Blob\n  [5]: https://github.com/eligrey/Blob.js\n  [6]: https://github.com/eligrey/canvas-toBlob.js\n\nContributing\n------------\n\nThe `FileSaver.js` distribution file is compiled with Uglify.js like so:\n\n```bash\nuglifyjs FileSaver.js --mangle --comments /@source/ > FileSaver.min.js\n# or simply:\nnpm run build\n```\n\nPlease make sure you build a production version before submitting a pull request.","maintainers":[{"name":"clarketm","email":"travis.m.clarke@gmail.com"}],"time":{"modified":"2022-06-18T00:38:23.358Z","created":"2016-11-26T06:26:21.676Z","1.0.0":"2016-11-26T06:26:21.676Z","1.3.4":"2016-11-26T06:27:18.029Z","1.3.5":"2016-11-26T10:13:09.725Z","1.3.6":"2017-05-02T08:37:55.648Z"},"homepage":"https://github.com/clarketm/FileSaver.js#readme","keywords":["filesaver","saveas","blob"],"repository":{"type":"git","url":"git+https://github.com/clarketm/FileSaver.js.git"},"bugs":{"url":"https://github.com/clarketm/FileSaver.js/issues"},"license":"MIT","readmeFilename":"README.md","users":{"clarketm":true}}