@shaman-apprentice/blob-saver
v1.1.2
Published
Lets you download a blob within a browser
Downloads
12
Maintainers
Readme
blob-saver
Lets you download a blob within a browser.
Before you install this library, please think about whether you really need this extra dependency. Maybe one of the following native solutions will work for you:
- download attribute of anchor element
- Content-Disposition: attachment HTTP response header
- File System API of browser - be careful with browser support for the time being
Example usage
import { saveBlob } from "@shaman-apprentice/blob-saver";
const blob = new Blob(["Hello world"], { type: "text/plain" });
saveBlob("greeting.txt", blob);