@mnesia/dl-file
Promise based HTTP file downloader
Last updated 7 months ago by billybobni .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mnesia/dl-file 
SYNC missed versions from official npm registry.

dl-file

Promise based HTTP file downloader

fetch(url, filename)
  .then(filename => console.log(`Saved to ${filename}`));

With progress support

function progressFunc(progress) {
  console.log(`Downloaded ${progress.downloadedBytes} of ${progress.totalSize}`);
}
const progressThrottle = 600;

fetch(url, filename, progressFunc, progressThrottle);

progressThrottle determines how often the progressFunc is called, default is 1000ms

Current Tags

  • 0.0.1                                ...           latest (7 months ago)

1 Versions

  • 0.0.1                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |