Socket
Socket
Sign inDemoInstall

download

Package Overview
Dependencies
71
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.12 to 0.1.13

37

package.json
{
"name": "download",
"version": "0.1.12",
"version": "0.1.13",
"description": "Download and extract files effortlessly",
"keywords": [
"download",
"extract",
"http",
"request",
"url"
],
"homepage": "https://github.com/kevva/download",
"bugs": "https://github.com/kevva/download/issues",
"license": "MIT",
"repository": "kevva/download",
"author": {
"name": "Kevin Martensson",
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "http://kevinmartensson.com"
"url": "https://github.com/kevva"
},
"license": "MIT",
"repository": "git://github.com/kevva/download.git",
"engines": {
"node": ">=0.10.0"
},
"bin": {
"download": "cli.js"
},
"scripts": {
"test": "mocha --reporter list"
},
"main": "index.js",
"files": [
"index.js"
],
"keywords": [
"download",
"extract",
"http",
"request",
"url"
],
"dependencies": {
"decompress": "~0.2.0",
"each-async": "~0.1.1",
"get-stdin": "^0.1.0",
"mkdirp": "~0.3.5",

@@ -39,6 +43,3 @@ "request": "~2.34.0",

"rimraf": "~2.2.5"
},
"engines": {
"node": ">=0.10.0"
}
}
# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download)
Download and extract files effortlessly in Node.js.
> Download and extract files effortlessly in Node.js.
## Getting started
## Install
Install with [npm](https://npmjs.org/package/download): `npm install download`
```bash
$ npm install --save download
```
## Examples
## Usage

@@ -45,11 +47,11 @@ If you're fetching an archive you can set `extract: true` in options and

Download a file or an array of files to a given destination. Returns an EventEmitter
Download a file or an array of files to a given destination. Returns an EventEmitter
that emits the following possible events:
* `response` — Relayed when the underlying `http.ClientRequest` emits the same
* `response` — Relayed when the underlying `http.ClientRequest` emits the same
event. Listeners called with a `http.IncomingMessage` instance.
* `data` — Relayed when the underlying `http.IncomingMessage` emits the same
* `data` — Relayed when the underlying `http.IncomingMessage` emits the same
event. Listeners called with a `Buffer` instance.
* `error` — Relayed when the underlying `http.ClientRequest` emits the same event
or when the response status code is not in the 200s. Listeners called with an
* `error` — Relayed when the underlying `http.ClientRequest` emits the same event
or when the response status code is not in the 200s. Listeners called with an
`Error` instance (in the first case) or the response status code.

@@ -83,4 +85,26 @@ * `close` — Relayed when the underlying `stream.Duplex` emits the same event.

## CLI
You can also use it as a CLI app by installing it globally:
```bash
$ npm install --global download
```
### Usage
```bash
$ download --help
Usage
$ download <url> <path>
$ cat <file> | download <path>
Example
$ download https://github.com/kevva/download/archive/master.zip files
$ cat urls.txt | download files
```
## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)
[MIT License](http://en.wikipedia.org/wiki/MIT_License) © [Kevin Mårtensson](http://kevinmartensson.com)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc