File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ saveAs must be run within a user interaction event such as onTouchDown or onClic
5454
5555Syntax
5656------
57- ### Import saveAs() from file-saver
57+ ### Import ` saveAs() ` from file-saver
5858``` js
5959import { saveAs } from ' file-saver' ;
6060```
@@ -68,7 +68,7 @@ Pass `{ autoBOM: true }` if you want FileSaver.js to automatically provide Unico
6868Examples
6969--------
7070
71- ### Saving text using require
71+ ### Saving text using ` require() `
7272``` js
7373var FileSaver = require (' file-saver' );
7474var blob = new Blob ([" Hello, world!" ], {type: " text/plain;charset=utf-8" });
@@ -96,7 +96,6 @@ The standard W3C File API [`Blob`][4] interface is not available in all browsers
9696[ Blob.js] [ 5 ] is a cross-browser ` Blob ` implementation that solves this.
9797
9898### Saving a canvas
99-
10099``` js
101100var canvas = document .getElementById (" my-canvas" );
102101canvas .toBlob (function (blob ) {
@@ -138,12 +137,14 @@ Installation
138137------------------
139138
140139``` bash
140+ # Basic Node.JS installation
141141npm install file-saver --save
142142bower install file-saver
143143```
144144
145145Additionally, TypeScript definitions can be installed via:
146146
147147``` bash
148+ # Additional typescript definitions
148149npm install @types/file-saver --save-dev
149150```
You can’t perform that action at this time.
0 commit comments