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.5 to 0.0.6

package-lock.json

3

example/tsconfig.json
{
"extends": "../src/tsconfig",
"compilerOptions": {
"noUnusedLocals": true
"noUnusedLocals": true,
"declaration": false
}
}
{
"name": "@hscmap/magic-trackpad-detector",
"version": "0.0.5",
"version": "0.0.6",
"main": "./lib/index.js",

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

export class MagicTrackpadDetector {
tolerance = 5 // ms
interval = 1000 / 60 // events per second
minN1 = 5

@@ -21,8 +19,7 @@ minN2 = 15

const n = h.at(-i + 1)
// const dt = n[0] - o[0]
// if (dt < this.interval - this.tolerance)
// return false
if (n[1] * o[1] < 0 || n[1] / o[1] > 1)
return false
}
if (h.at(-1)[1] == h.at(-this.minN1 + 1)[1])
return false
}

@@ -40,5 +37,2 @@ else { // |deltaY| == 1

const n = h.at(-i + 1)
// const dt = n[0] - o[0]
// if (dt < this.interval - this.tolerance)
// return false
if (n[1] * o[1] < 0 || n[1] / o[1] > 1)

@@ -45,0 +39,0 @@ return false

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