Socket
Socket
Sign inDemoInstall

pngjs

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pngjs - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

13

lib/packer-sync.js
'use strict';
var hasSyncZlib = true;
var zlib = require('zlib');
if (!zlib.deflateSync) {
// Backwards compatibility with 0.10.
zlib = require('node-zlib-backport');
try {
zlib = require('node-zlib-backport');
}
catch(ex) {
hasSyncZlib = false;
}
}

@@ -12,2 +18,7 @@ var constants = require('./constants');

module.exports = function(metaData, opt) {
if (!hasSyncZlib) {
throw new Error('To use the sync capability of this library in old node versions, please also add a dependency on node-zlb-backport');
}
var options = opt || {};

@@ -14,0 +25,0 @@

15

lib/parser-sync.js
'use strict';
var hasSyncZlib = true;
var zlib = require('zlib');
if (!zlib.inflateSync) {
if (!zlib.deflateSync) {
// Backwards compatibility with 0.10.
zlib = require('node-zlib-backport');
try {
zlib = require('node-zlib-backport');
}
catch(ex) {
hasSyncZlib = false;
}
}

@@ -17,2 +23,6 @@ var SyncReader = require('./sync-reader');

if (!hasSyncZlib) {
throw new Error('To use the sync capability of this library in old node versions, please also add a dependency on node-zlb-backport');
}
var err;

@@ -89,2 +99,1 @@ function handleError(_err_) {

};
{
"name": "pngjs",
"version": "2.3.0",
"version": "2.3.1",
"description": "PNG encoder/decoder in pure JS, supporting any bit size & interlace, async & sync with full test suite.",

@@ -52,5 +52,2 @@ "contributors": [

},
"optionalDependencies": {
"node-zlib-backport": "^0.11.15"
},
"devDependencies": {

@@ -57,0 +54,0 @@ "buffer-equal": "1.0.0",

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