Socket
Socket
Sign inDemoInstall

@xhmikosr/downloader

Package Overview
Dependencies
9
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.0.1 to 10.0.2

10

index.js

@@ -11,3 +11,3 @@ import {promises as fs} from 'node:fs';

import {pEvent} from 'p-event';
import {fileTypeFromBuffer} from 'file-type';
import fileType from 'file-type';
import extName from 'ext-name';

@@ -33,3 +33,3 @@

const getFilename = async (res, data) => {
const getFilename = (res, data) => {
const header = res.headers['content-disposition'];

@@ -48,3 +48,3 @@

if (!path.extname(filename)) {
const ext = (await fileTypeFromBuffer(data) || {}).ext || getExtFromMime(res);
const ext = (fileType(data) || {}).ext || getExtFromMime(res);

@@ -78,3 +78,3 @@ if (ext) {

return Promise.all([getStream(stream, {encoding}), res]);
}).then(async result => {
}).then(result => {
const [data, res] = result;

@@ -86,3 +86,3 @@

const filename = options.filename || filenamify(await getFilename(res, data));
const filename = options.filename || filenamify(getFilename(res, data));
const outputFilepath = path.join(output, filename);

@@ -89,0 +89,0 @@

{
"name": "@xhmikosr/downloader",
"version": "10.0.1",
"version": "10.0.2",
"description": "Download and extract files",

@@ -46,3 +46,3 @@ "license": "MIT",

"ext-name": "^5.0.0",
"file-type": "^18.4.0",
"file-type": "^12.4.2",
"filenamify": "^5.1.1",

@@ -49,0 +49,0 @@ "get-stream": "^6.0.1",

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