# dwn

> A simple tool for downloading via node.js

Latest version **0.0.2** (published 2016-05-15) · 0 weekly downloads

## Install

```sh
npm install dwn
pnpm add dwn
yarn add dwn
bun add dwn
```

Provides the command `dwn`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2016-05-15 |
| First published | 2015-07-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | fritx |
| Keywords | dwn, download, stream |

## Links

- npm: https://www.npmjs.com/package/dwn
- Repository: https://github.com/fritx/dwn
- Homepage: https://github.com/fritx/dwn#readme
- Issues: https://github.com/fritx/dwn/issues
- npm.io page: https://npm.io/package/dwn

## Dependencies (5)

- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [request](https://npm.io/package/request.md) ^2.60.0
- [through2](https://npm.io/package/through2.md) ^2.0.0
- [bufferhelper](https://npm.io/package/bufferhelper.md) ^0.2.0
- [progress-bar](https://npm.io/package/progress-bar.md) ^0.1.1

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2016-05-15
- 0.0.1 — 2015-07-22

## README

# dwn

A simple tool for downloading via node.js

*Base code partly copied from [hughsk/nw-download](https://github.com/hughsk/nw-download)*

## Command Line

```plain
$ npm install -g dwn
```

```plain
$ dwn http://example.com/logo.png
$ dwn http://example.com/logo.png cache/
$ dwn http://example.com/logo.png cache/boy.png
```

## Nodejs Library

```js
var dwn = require('dwn')
dwn({
  uri: 'http://example.com/logo.png',  // required
  progress: function(v){},  // eg. 15%, v=0.15
  callback: function(err, buf){}  // buffer
})
```

or with stream:

```js
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))
```

---
_Source: https://npm.io/package/dwn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
