# npmdl

> Conveniently download files from npm packages

Latest version **1.0.2** (published 2015-04-03) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-04-03 |
| First published | 2015-03-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Hugh Kennedy |
| Maintainers | hughsk |
| Keywords | npm, download, dl, files, remote, unpack, untar |

## Links

- npm: https://www.npmjs.com/package/npmdl
- Repository: https://github.com/hughsk/npmdl
- Issues: https://github.com/hughsk/npmdl/issues
- npm.io page: https://npm.io/package/npmdl

## Dependencies (4)

- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.0
- [tar-fs](https://npm.io/package/tar-fs.md) ^1.5.0
- [request](https://npm.io/package/request.md) ^2.53.0
- [userhome](https://npm.io/package/userhome.md) ^1.0.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2015-04-03
- 1.0.1 — 2015-03-13
- 1.0.0 — 2015-03-13

## README

# npmdl
![](http://img.shields.io/badge/stability-experimental-orange.svg?style=flat)
![](http://img.shields.io/npm/v/npmdl.svg?style=flat)
![](http://img.shields.io/npm/dm/npmdl.svg?style=flat)
![](http://img.shields.io/npm/l/npmdl.svg?style=flat)

Conveniently download files from npm packages, caching
the results on the file system.

You could use this to build your own [npm-cdn](http://github.com/zeke/npm-cdn),
or a simple [requirebin](http://requirebin.com)-type editor. Note however
that because scripts aren't run that some packages might not work this way.

## Usage

[![NPM](https://nodei.co/npm/npmdl.png)](https://nodei.co/npm/npmdl/)

### `dl = npmdl([directory])`

Creates a new downloader, using `directory` to store downloaded
packages in. `directory` defaults to `~/.npmdl`.

### `dl(package, version, filename, done)`

Downloads `package@version`, and calls `done(err, content)`
with the contents of `filename` when complete. If already
downloaded, the file will be read out directly so we can
save bandwidth and go a little easier on the npm registry :)

``` javascript
var npmdl = require('npmdl')

npmdl(__dirname)('browserify', '9.0.0', 'bin/advanced.txt', function(err, content) {
  if (err) throw err

  // logs browserify@9.0.0's advanced help to the console
  console.log(content)
})
```

## License

MIT. See [LICENSE.md](http://github.com/hughsk/npmdl/blob/master/LICENSE.md) for details.

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