Socket
Socket
Sign inDemoInstall

compressing

Package Overview
Dependencies
32
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.2 to 1.6.3

5

lib/utils.js

@@ -81,2 +81,7 @@ 'use strict';

opts.source = source;
if (!source) { // !source 和 sourceType中返回undeined对应
const error = new Error('Type is not supported, must be a file path, file buffer, or a readable stream');
error.name = 'IlligalSourceError';
throw error;
}
if (destType(destDir) !== 'path') {

@@ -83,0 +88,0 @@ const error = new Error('uncompress destination must be a directory');

11

package.json
{
"name": "compressing",
"version": "1.6.2",
"version": "1.6.3",
"description": "Everything you need for compressing and uncompressing",

@@ -56,3 +56,2 @@ "main": "index.js",

"egg-bin": "^1.9.1",
"egg-ci": "^2.1.0",
"eslint": "^3.10.2",

@@ -70,11 +69,3 @@ "eslint-config-egg": "^3.2.0",

"node": ">= 4.0.0"
},
"ci": {
"version": "10, 12, 14, 16, 18",
"os": "linux, macos",
"license": {
"year": "2017",
"fullname": "node-modules and other contributors"
}
}
}

@@ -75,4 +75,4 @@ # compressing

// You should take care of stream errors in caution, use pump to handle error in one place
const pump = require('pump';)
const sourceStream = fs.createReadStream('file/path/to/compress')
const pump = require('pump');
const sourceStream = fs.createReadStream('file/path/to/compress');
const gzipStream = new compressing.gzip.FileStream();

@@ -79,0 +79,0 @@ const destStream = fs.createWriteStream('path/to/destination.gz');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc