Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

js-file-download

kennethjiang2.8mMIT0.4.12TypeScript support: included

Javascript function that triggers browser to save javascript-generated content to a file

javascript, file, react, download

readme

Javascript File Download

Javascript function to trigger browser to save data to file as if it was downloaded.

Installation

npm install js-file-download --save

Usage

var fileDownload = require('js-file-download');
fileDownload(data, 'filename.csv');