Socket
Socket
Sign inDemoInstall

download

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

download - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

7

download.js

@@ -20,3 +20,3 @@ 'use strict';

*
* @param {String|Array} url
* @param {String|Array|Object} url
* @param {String} dest

@@ -39,2 +39,7 @@ * @param {Object} opts

if (url.url && url.name) {
target = path.join(dest, url.name);
opts.url = url.url;
}
var req = request.get(opts)

@@ -41,0 +46,0 @@ .on('response', function (res) {

4

package.json
{
"name": "download",
"version": "0.1.8",
"version": "0.1.9",
"description": "Download and extract files effortlessly",

@@ -31,3 +31,2 @@ "keywords": [

"mkdirp": "~0.3.5",
"nock": "~0.27.1",
"request": "~2.31.0",

@@ -38,2 +37,3 @@ "through2": "~0.4.0"

"mocha": "~1.17.0",
"nock": "~0.27.1",
"rimraf": "~2.2.5"

@@ -40,0 +40,0 @@ },

@@ -23,5 +23,18 @@ # download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download)

// download and save `foo.zip` into `bar/foobar.zip`
download({ url: 'foo.zip', name: 'foobar.zip' }, 'bar');
// download and save an array of files in `bar/`
var files = ['foo.jpg', 'bar.jpg', 'cat.jpg'];
download(files, 'bar');
// download, save and rename an array of files in `bar/`
var files = [{
url: 'foo.jpg',
name: 'foobar.jpg'
}, {
url: 'cat.jpg',
name: 'dog.jpg'
}];
download(files, 'bar');
```

@@ -28,0 +41,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc