download.js
v1.0.0
Published
A simple file downloader
Downloads
2,308
Readme
download.js
A simple file downloader for JavaScript.
Installation
npm install --save download.js
Usage
Download text as file using the downloadText
function:
import { downloadText } from 'download.js'
downloadText('file.txt', 'Lorem ipsum dolor sit amet')
To download a blob, one may use the downloadBlob
function.