downit
Resumeable downloader
Last updated 2 years ago by porsager .
WTFPL · Original npm · Tarball · package.json
$ cnpm install downit 
SYNC missed versions from official npm registry.

Downit - Resume downloads in node

Downit simply downloads a file from a URL to a destination on the disk, resuming previous progress if the server supports the Range header.

Install

npm i downit

Usage

downit(url, dest, [options])

const downit = require('downit')

downit(url, dest, {
  headers: { Authorization: 'Bearer Of Good News' },
  progress: (got, total) => console.log('Got ', got, 'B of ', total, 'B'),
  onrequest: req => { /* The node request instance */ },
  onresponse: res => { /* The node response instance */ }
}).then(() => {
  console.log('Downed it')
}).catch(e => {
  console.error('Dropped it, due to ', e)
})

CLI

Downit also works on the command line.

Installation

npm i downit -g

Usage

downit url [dest]

Current Tags

  • 2.0.0                                ...           latest (9 months ago)

10 Versions

  • 2.0.0                                ...           9 months ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.5.0                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 13
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2017 © taobao.org |