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

pam-diff

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pam-diff - npm Package Compare versions

Comparing version 0.4.10 to 0.5.0

10

index.js

@@ -73,3 +73,3 @@ // jshint esversion: 6, globalstrict: true, strict: true

name: region.name,
containsPoint: polygonPoints.containsPoint.bind(polygonPoints),
polygon: polygonPoints,
pointsLength: polygonPoints.pointsLength(),

@@ -141,3 +141,3 @@ difference: this._validateNumber(parseInt(region.difference), this._difference, 1, 255),

for (let j = 0; j < this._regionsLength; j++) {
if (this._regions[j].containsPoint([x,y]) === true) {
if (this._regions[j].polygon.containsPoint({x: x, y: y}) === true) {
if (this._oldPix[i] !== this._newPix[i]) {

@@ -184,3 +184,3 @@ this._regions[j].diffs++;

for (let j = 0; j < this._regionsLength; j++) {
if (this._regions[j].containsPoint([x,y]) === true) {
if (this._regions[j].polygon.containsPoint({x: x, y: y}) === true) {
if (Math.abs(this._oldPix[i] - this._newPix[i]) >= this._regions[j].difference) {

@@ -227,3 +227,3 @@ this._regions[j].diffs++;

for (let j = 0; j < this._regionsLength; j++) {
if (this._regions[j].containsPoint([x,y]) === true) {
if (this._regions[j].polygon.containsPoint({x: x, y: y}) === true) {
if (Math.abs(this._grayscale(this._oldPix[i], this._oldPix[i + 1], this._oldPix[i + 2]) - this._grayscale(this._newPix[i], this._newPix[i + 1], this._newPix[i + 2])) >= this._regions[j].difference) {

@@ -270,3 +270,3 @@ this._regions[j].diffs++;

for (let j = 0; j < this._regionsLength; j++) {
if (this._regions[j].containsPoint([x,y]) === true) {
if (this._regions[j].polygon.containsPoint({x: x, y: y}) === true) {
if (Math.abs(this._grayscale(this._oldPix[i], this._oldPix[i + 1], this._oldPix[i + 2]) - this._grayscale(this._newPix[i], this._newPix[i + 1], this._newPix[i + 2])) >= this._regions[j].difference) {

@@ -273,0 +273,0 @@ this._regions[j].diffs++;

{
"name": "pam-diff",
"version": "0.4.10",
"version": "0.5.0",
"description": "Measure differences between pixel arrays extracted from pam images",

@@ -30,3 +30,3 @@ "main": "index.js",

"dependencies": {
"polygon-points": "^0.1.7"
"polygon-points": "^0.2.0"
},

@@ -33,0 +33,0 @@ "devDependencies": {

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