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

node-pngcrush

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-pngcrush - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js

@@ -20,3 +20,5 @@ var _handle = require('./scripts/util/binding.js')();

if (cb) this._callback = cb;
if (process.versions.node >= '4.0.0') {
if (process.versions.node >= '10.0.0') {
out = (new _handle.Pngcrush(buffer, this._option)).compress();
} else if (process.versions.node >= '4.0.0') {
out = new _handle(buffer, this._option).compress();

@@ -23,0 +25,0 @@ } else {

{
"name": "node-pngcrush",
"version": "1.0.0",
"version": "1.0.1",
"description": "The node-pngcrush is an addon of node, as a readable/writable stream",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,3 +11,8 @@ /*!

module.exports = function() {
if (!extensions.hasBinary(extensions.getBinaryPath())) {
var binaryPath;
if (extensions.hasBinary(extensions.getBuildBinaryPath())) {
return require(extensions.getBuildBinaryPath());
}
if (!extensions.hasBinary(binaryPath = extensions.getBinaryPath())) {
if (!extensions.isSupportedEnvironment()) {

@@ -14,0 +19,0 @@ throw new Error(errors.unsupportedEnvironment());

@@ -44,3 +44,3 @@ /*!

'Missing binding ' + extensions.getBinaryPath(),
pkg.name + 'could not find a binding for your current environment: ' + humanEnvironment(),
pkg.name + ' could not find a binding for your current environment: ' + humanEnvironment(),
'',

@@ -47,0 +47,0 @@ foundBinaries(),

@@ -79,2 +79,3 @@ /*!

case 57: return 'Node.js 8.x';
case 64: return 'Node.js 10.x';
default: return false;

@@ -281,2 +282,12 @@ }

function getBuildBinaryPath() {
var env = process.env['NODE_DEBUG'] === 'dev' ? 'Debug' : 'Release';
return path.resolve(
path.dirname(__dirname),
'..',
'build',
env,
'binding.node'
);
}
/**

@@ -413,2 +424,3 @@ * An array of paths suitable for use as a local disk cache of the binding.

module.exports.getBinaryPath = getBinaryPath;
module.exports.getBuildBinaryPath = getBuildBinaryPath;
module.exports.getBinaryCachePath = getBinaryCachePath;

@@ -415,0 +427,0 @@ module.exports.getCachedBinary = getCachedBinary;

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