New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-pngcrush

Package Overview
Dependencies
Maintainers
1
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 0.0.1 to 0.0.2

lib/darwin/png_compress.node

29

binding.js

@@ -1,1 +0,28 @@

module.exports = require('./build/Release/png_compress.node');
var fs = require("fs"),
path = require("path"),
name = "png_compress.node",
tryList, i, count, file;
tryList = [
path.join(__dirname, "build", "Release", name), // build dir
path.join(__dirname, "lib", process.platform, name) // prebuild lib
];
count = tryList.length;
for (i = 0; i < count; i++) {
file = tryList[i];
if (fs.existsSync(file)) {
try {
exports = require(file);
} catch (e) {
continue; // try next
}
break;
}
}
if (exports && exports.PngCompress) {
module.exports = exports;
} else {
throw new Error("Can't load addon.");
}

5

package.json
{
"name": "node-pngcrush",
"version": "0.0.1",
"version": "0.0.2",
"description": "The node-pngcrush is an addon of node, as a readable/writable stream",

@@ -10,4 +10,3 @@ "main": "index.js",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"install": "node install.js"
"test": "echo \"Error: no test specified\" && exit 1"
},

@@ -14,0 +13,0 @@ "repository": {

@@ -9,3 +9,3 @@ ##node-pngcrush

##使用
##!使用

@@ -12,0 +12,0 @@ ```javascript

@@ -7,3 +7,3 @@ var C = require('..');

if (err) throw err;
var buffer = C.compress(data);
var buffer = C.option('-v -bit_depth 8').compress(data);
fs.writeFile('./alphatest_out.png', buffer, {

@@ -10,0 +10,0 @@ flags: 'wb'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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