when I run the following code, everything works fine:
//downloads the puzzle as a JSON file
let blob = new Blob([JSON.stringify(puzzle)], {type: "application/json;charset=utf-8"});
FileSaver.saveAs(blob, `puzzle-${this.state.puzzleName}.json`);
but if I do
//downloads the puzzle as a JSON file
let blob = new BlobJS([JSON.stringify(puzzle)], {type: "application/json;charset=utf-8"});
FileSaver.saveAs(blob, `puzzle-${this.state.puzzleName}.json`);
my webapp crashes and I get the following error, despite the fact that I've imported Blob.js
TypeError: WEBPACK_IMPORTED_MODULE_2_blobjsdefault.a is not a constructor
How am I supposed to use Blob.js? I see that there's lots of links to the Blob documentation in this repo, but obviously I'm missing something because using it like the native Blob doesn't do the same thing...
I'm having trouble using Blob.js...
when I run the following code, everything works fine:
but if I do
my webapp crashes and I get the following error, despite the fact that I've imported Blob.js
How am I supposed to use Blob.js? I see that there's lots of links to the Blob documentation in this repo, but obviously I'm missing something because using it like the native Blob doesn't do the same thing...