# download-npm-package

> Download a single npm package

Latest version **3.1.12** (published 2018-01-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install download-npm-package
pnpm add download-npm-package
yarn add download-npm-package
bun add download-npm-package
```

Provides the command `download-npm-package`.

## 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 | 3.1.12 |
| Published | 2018-01-03 |
| First published | 2016-07-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | David Björklund |
| Maintainers | kesla |

## Links

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

## Dependencies (6)

- [home](https://npm.io/package/home.md) ^1.0.1
- [mkdirp-then](https://npm.io/package/mkdirp-then.md) ^1.2.0
- [registry-info](https://npm.io/package/registry-info.md) ^1.0.0
- [npm-package-arg](https://npm.io/package/npm-package-arg.md) ^4.2.0
- [download-package-tarball](https://npm.io/package/download-package-tarball.md) ^1.0.0
- [get-package-json-from-registry](https://npm.io/package/get-package-json-from-registry.md) ^2.0.0

## Recent versions

- 3.1.12 (latest) — 2018-01-03
- 3.1.11 — 2017-09-07
- 3.1.10 — 2016-08-26
- 3.1.9 — 2016-08-08
- 3.1.8 — 2016-07-16
- 3.1.7 — 2016-07-14
- 3.1.6 — 2016-07-13
- 3.1.5 — 2016-07-13
- 3.1.4 — 2016-07-10
- 3.1.3 — 2016-07-10
- 3.1.2 — 2016-07-10
- 3.1.1 — 2016-07-10
- 3.1.0 — 2016-07-09
- 3.0.0 — 2016-07-09
- 2.0.0 — 2016-07-09
- … 2 more at https://npm.io/package/download-npm-package/versions

## README

# download-npm-package

Download a module from the npm registry.

## Installation

```shell
npm [-g] install download-npm-package
```

## Features

* Library to download packages
* CLI to download packages
* Will use registry (and auth) defined in your `.npmrc` file
* Supports scoped packages

## Usage

### node

*downloadNpmPackage* takes an package arg & a path as arguments and returns a promise, a promise that resolves once the package has been downloaded to the folder set in path.

```js
import downloadNpmPackage from 'download-npm-package';

downloadNpmPackage({
  arg: 'modulname@version' // for example, npm@2 or @mic/version@latest etc
  dir: '/tmp' // package will be downlodaded to ${dir}/packageName
}).then()
```

### cli

There's also a cli available!

```shell
download-npm-package $packageArg [$path]
```

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