dwn
0.0.2 • Public • Published dwn
A simple tool for downloading via node.js
Base code partly copied from hughsk/nw-download
Command Line
$ dwn http://example.com/logo.png
$ dwn http://example.com/logo.png cache/
$ dwn http://example.com/logo.png cache/boy.png
Nodejs Library
var dwn = require('dwn')
dwn({
uri: 'http://example.com/logo.png',
progress: function(v){},
callback: function(err, buf){}
})
or with stream:
var stream = dwn._download(uri)
stream.on('progress', function(v){
console.log('progress:', v)
})
stream.on('end', done)
stream.on('error', done)
stream.pipe(createWriteStream(dest))
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 0.0.2
5
Version History
Package Sidebar
Install
Weekly Downloads