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

@hscmap/magic-trackpad-detector

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hscmap/magic-trackpad-detector - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

5

lib/index.js

@@ -17,7 +17,8 @@ "use strict";

return false;
for (var i = this.minN; i > 1; --i) {
for (var i = this.minN - 1; i > 1; --i) {
var o = h.at(-i);
var n = h.at(-i + 1);
var dt = n[0] - o[0];
if (dt < this.interval - this.tolerance || this.interval + this.tolerance < dt)
var dv = n[1] - o[1];
if (dv != 0 && (dt < this.interval - this.tolerance || this.interval + this.tolerance < dt))
return false;

@@ -24,0 +25,0 @@ if (n[1] * o[1] < 0 || n[1] / o[1] > 1)

2

package.json
{
"name": "@hscmap/magic-trackpad-detector",
"version": "0.0.1",
"version": "0.0.2",
"main": "./lib/index.js",

@@ -5,0 +5,0 @@ "types": "./lib/index.d.ts",

@@ -14,7 +14,8 @@ export class MagicTrackpadDetector {

return false
for (let i = this.minN; i > 1; --i) {
for (let i = this.minN - 1; i > 1; --i) {
const o = h.at(-i)
const n = h.at(-i + 1)
const dt = n[0] - o[0]
if (dt < this.interval - this.tolerance || this.interval + this.tolerance < dt)
const dv = n[1] - o[1]
if (dv != 0 && (dt < this.interval - this.tolerance || this.interval + this.tolerance < dt))
return false

@@ -21,0 +22,0 @@ if (n[1] * o[1] < 0 || n[1] / o[1] > 1)

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