Permalink
Browse files

Merge pull request #273 from Amitesh/require-syntax-usage

 Saving text using with require statement
  • Loading branch information...
2 parents 5ed507e + cafa1bf commit aa9f4e0e03bd1892482ff5e24ca91d42312dbf18 @jimmywarting jimmywarting committed on GitHub Oct 14, 2016
Showing with 7 additions and 0 deletions.
  1. +7 −0 README.md
View
@@ -67,6 +67,13 @@ Pass `true` for `disableAutoBOM` if you don't want FileSaver.js to automatically
Examples
--------
+### Saving text using with 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
```js

0 comments on commit aa9f4e0

Please sign in to comment.