sgrins/js-file-download

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

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 120

Language:JavaScript

Type:component

v0.4.9 2020-03-14 10:07 UTC

This package is auto-updated.

Last update: 2024-04-14 19:29:09 UTC


README

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');