1.0.1 • Published 7 years ago

loadurl v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

loadurl

download a online file into your local disk progressively with many indicators such as progress percent transferred total kbps,elapsed time left time approximately.

const dl = require('loadurl');

/**
 * @method download
 * @uri required {string} uri online resource.
 * @to  required {string} destination path
 * @cb  required {Function} node style callback
 * @return {none}
 */

dl('http://google.com/repo/xx.dmg', './', (err) => {
  if (err) {
    return console.error(err);
  }
  console.log('done');
})