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

resemblejs

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resemblejs - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

tests/main_spec.js

2

package.json
{
"name": "resemblejs",
"version": "2.0.1",
"version": "2.1.0",
"description": "Image analysis and comparison with HTML5",

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

@@ -151,3 +151,10 @@ /*

hiddenImage.onerror = function () {
hiddenImage.onerror = null; //fixes pollution between calls
images.push({ error : "Image load error."});
callback();
};
hiddenImage.onload = function() {
hiddenImage.onload = null; //fixes pollution between calls

@@ -469,3 +476,4 @@ var hiddenCanvas = document.createElement('canvas');

data.misMatchPercentage = (mismatchCount / (height*width) * 100).toFixed(2);
data.rawMisMatchPercentage = (mismatchCount / (height*width) * 100);
data.misMatchPercentage = data.rawMisMatchPercentage.toFixed(2);
data.diffBounds = diffBounds;

@@ -536,2 +544,8 @@ data.analysisTime = Date.now() - time;

if(images.length === 2){
if( images[0].error || images[1].error ){
data = {};
data.error = images[0].error ? images[0].error : images[1].error;
triggerDataUpdate();
return;
}
width = images[0].width > images[1].width ? images[0].width : images[1].width;

@@ -538,0 +552,0 @@ height = images[0].height > images[1].height ? images[0].height : images[1].height;

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