download
Advanced tools
Comparing version 6.2.1 to 6.2.2
18
index.js
@@ -23,9 +23,8 @@ 'use strict'; | ||
const header = res.headers['content-disposition']; | ||
if (!header) { | ||
return filenameFromPath(res); | ||
} | ||
const parsed = contentDisposition.parse(res.headers['content-disposition']); | ||
if (parsed.parameters && parsed.parameters.filename) { | ||
return parsed.parameters.filename; | ||
if (header) { | ||
const parsed = contentDisposition.parse(header); | ||
if (parsed.parameters && parsed.parameters.filename) { | ||
return parsed.parameters.filename; | ||
} | ||
} | ||
@@ -64,7 +63,6 @@ | ||
if (!output && opts.extract) { | ||
return decompress(data, opts); | ||
} | ||
if (!output) { | ||
if (opts.extract) { | ||
return decompress(data, opts); | ||
} | ||
return data; | ||
@@ -71,0 +69,0 @@ } |
{ | ||
"name": "download", | ||
"version": "6.2.1", | ||
"version": "6.2.2", | ||
"description": "Download and extract files", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
5726
68