loadurl
v1.0.1
Published
download a online file into your local disk.
Downloads
5
Readme
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');
})