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

fetch

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.2                                ...           latest (7 months ago)

2 Versions

  • 0.0.2                                ...           7 months ago
  • 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 0
Dependencies (3)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |