blob-dl
v0.0.1
Published
A simple library to download a Blob from the browser as a file.
Maintainers
Readme
⬇️ blob-dl
This package exports a single function, downloadBlob, which can be used to download a blob from the browser and save it as a file.
Features
- Simple API and usage
- Small size (< 1KB)
- No dependencies
- Written in Typescript
- ESM only
API & Package Info
downloadBlob: (blob: Blob, name: string) => void;Install
Using npm:
npm i blob-dlUsing yarn:
yarn add blob-dlUsing pnpm:
pnpm add blob-dlUsing bun:
bun add blob-dlUsage
Basic usage:
import { downloadBlob } from "blob-dl";
// Create a blob.
let blob = new Blob(["Hello, world!"], { type: "text/plain" });
// This is the name of the file to be saved.
let name = "hello.txt";
// Start the download in the browser.
downloadBlob(blob, name);License
MITMIT License. See LICENSE file.
Copyright (c) 2025 Edoardo Scibona.
