From eaeac8dc3c2b1d0c260006cf0a93002dab560fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20W=C3=A4rting?= Date: Wed, 26 Sep 2018 12:09:50 +0200 Subject: [PATCH] fix BOM api docs --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3a61a84..cc44961 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ If you need to save really large files bigger then the blob's size limitation or don't have -enough RAM, then have a look at the more advanced [StreamSaver.js](https://github.com/jimmywarting/StreamSaver.js) +enough RAM, then have a look at the more advanced [StreamSaver.js][7] that can save data directly to the hard drive asynchronously with the power of the new streams API. That will have support for progress, cancelation and knowing when it's done writing @@ -67,7 +67,7 @@ import { saveAs } from 'file-saver/FileSaver'; FileSaver saveAs(Blob/File/Url, optional DOMString filename, optional Boolean autoBOM) ``` -Pass `true` for `autoBOM` 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)). +Pass `true` for `autoBOM` if you want FileSaver.js to automatically provide Unicode text encoding hints (see: [byte order mark](https://en.wikipedia.org/wiki/Byte_order_mark)). Examples -------- @@ -102,8 +102,7 @@ The standard W3C File API [`Blob`][4] interface is not available in all browsers ### Saving a canvas ```js -var canvas = document.getElementById("my-canvas"), ctx = canvas.getContext("2d"); -// draw to canvas... +var canvas = document.getElementById("my-canvas"); canvas.toBlob(function(blob) { saveAs(blob, "pretty image.png"); }); @@ -136,7 +135,7 @@ FileSaver.saveAs(file); [4]: https://developer.mozilla.org/en-US/docs/DOM/Blob [5]: https://github.com/eligrey/Blob.js [6]: https://github.com/eligrey/canvas-toBlob.js - + [7]: https://github.com/jimmywarting/StreamSaver.js Installation ------------------