Comparing version 0.1.4 to 0.1.5
@@ -17,4 +17,5 @@ 'use strict'; | ||
* - `extract` Try extracting the file | ||
* - `mode` Set mode on the downloaded files | ||
* | ||
* @param {String} url | ||
* @param {String|Array} url | ||
* @param {String} dest | ||
@@ -66,2 +67,6 @@ * @param {Object} opts | ||
end.on('close', function () { | ||
if (!opts.extract && opts.mode) { | ||
fs.chmodSync(opts.dest, opts.mode); | ||
} | ||
stream.emit('close'); | ||
@@ -68,0 +73,0 @@ }); |
{ | ||
"name": "download", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Download and extract files effortlessly", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -20,4 +20,4 @@ # download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download) | ||
// download and save `foo.jpg` into `bar/foo.jpg` | ||
download('foo.jpg', 'bar'); | ||
// download and save `foo.exe` into `bar/foo.exe` with mode `0755` | ||
download('foo.exe', 'bar', { mode: 0755 }); | ||
@@ -24,0 +24,0 @@ // download and save an array of files in `bar/` |
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
4033
63