Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xhmikosr/decompress-tarbz2

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xhmikosr/decompress-tarbz2 - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0

17

index.js
import {Buffer} from 'node:buffer';
import decompressTar from '@xhmikosr/decompress-tar';
import fileType from 'file-type';
import {fileTypeFromBuffer} from 'file-type';
import {isStream} from 'is-stream';

@@ -8,10 +8,13 @@ import seekBzip from 'seek-bzip';

// eslint-disable-next-line import/no-anonymous-default-export
export default () => input => {
const decompressTarBz2 = () => async input => {
if (!Buffer.isBuffer(input) && !isStream(input)) {
return Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof input}`));
throw new TypeError(`Expected a Buffer or Stream, got ${typeof input}`);
}
if (Buffer.isBuffer(input) && (!fileType(input) || fileType(input).ext !== 'bz2')) {
return Promise.resolve([]);
if (Buffer.isBuffer(input)) {
const type = await fileTypeFromBuffer(input);
if (!type || type.ext !== 'bz2') {
return [];
}
}

@@ -25,1 +28,3 @@

};
export default decompressTarBz2;
{
"name": "@xhmikosr/decompress-tarbz2",
"version": "5.0.0",
"version": "6.0.0",
"description": "decompress tar.bz2 plugin",

@@ -43,4 +43,4 @@ "license": "MIT",

"dependencies": {
"@xhmikosr/decompress-tar": "^5.0.0",
"file-type": "^12.4.2",
"@xhmikosr/decompress-tar": "^6.0.1",
"file-type": "^18.5.0",
"is-stream": "^3.0.0",

@@ -51,3 +51,3 @@ "seek-bzip": "^1.0.6",

"devDependencies": {
"ava": "^5.3.0",
"ava": "^4.3.3",
"is-jpg": "^3.0.0",

@@ -54,0 +54,0 @@ "xo": "^0.54.2"

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