Comparing version 0.1.8 to 0.1.9
@@ -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) { |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5854
5
84
85
3
- Removednock@~0.27.1
- Removednock@0.27.3(transitive)
- Removedpropagate@0.2.2(transitive)