0.0.2 • Published 6 years ago

@mnesia/fetch v0.0.2

Weekly downloads
-
License
-
Repository
github
Last release
6 years ago

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

0.0.2

6 years ago

0.0.1

6 years ago