Socket
Socket
Sign inDemoInstall

download

Package Overview
Dependencies
60
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

4

package.json
{
"name": "download",
"version": "0.1.0",
"description": "Download and extract files",
"version": "0.1.1",
"description": "Download and extract files effortlessly",
"keywords": [

@@ -6,0 +6,0 @@ "url",

# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download)
Downloading made easy.
Download and extract files effortlessly in Node.js.

@@ -11,14 +11,29 @@ ## Getting started

If you're fetching an archive you can set `extract: true` in options and
it'll extract it for you.
```js
var download = require('download');
download('foo.tar.gz', 'bar');
// => download and extract `foo.tar.gz` into `bar/`
// download and extract `foo.tar.gz` into `bar/`
download('foo.tar.gz', 'bar', { extract: true; });
// download and save `foo.jpg` into `bar/foo.jpg`
download('foo.jpg', 'bar/foo.jpg');
// => download and save `foo.jpg` into `bar/foo.jpg`
```
## API
### download(url, dest, opts)
Download a file to a given destination.
## Options
* `extract` — If set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/).
You can also define options accepted by the [request](https://github.com/mikeal/request/) module.
## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc