0.1.0 • Published 6 years ago

fast-downloads v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

FAST - Download

A small library to trigger File downloads that works on Browser and Cordova

Installing

To install this package into your project, you can use the following command within your terminal

npm install --save fast-downloads

Usage

Using the Downloader with promises

import Download from 'fast-downloads';

Download.file({ content, fileName, mimeType }).then(() => {
  // console.log('The file was downloaded')
});

Using the Downloader with Await

import Download from 'fast-downloads';

  let downloaded = await Download.file({ content, fileName, mimeType })
  if(downloaded){
    // console.log('The file was downloaded')
  }

Example

import Download from 'fast-downloads';

  let downloaded = await Download.file({
            content: some.csv,                    // Content to include in the download
            fileName: 'download.csv',             // Name and extension of the file
            mimeType: 'text/csv;encoding:utf-8'   // mimeType for the given extension
          });

Readings

0.1.0

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago