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

@baggie/detection

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baggie/detection - npm Package Compare versions

Comparing version 1.3.5 to 1.4.0

2

lib/input/detectInputMethod.d.ts

@@ -9,3 +9,3 @@ /**

continuousDetection?: boolean;
setClassOnElement?: HTMLElement;
setClassOnElement?: HTMLElement | false;
callback?: ({ isMouse, isTouch, }: {

@@ -12,0 +12,0 @@ isMouse: boolean;

@@ -16,2 +16,7 @@ "use strict";

}
const element = this.settings.setClassOnElement;
if (element) {
element.classList.remove(this.settings.mouseClass || "");
element.classList.add(this.settings.touchClass || "");
}
if (this.settings.callback) {

@@ -23,7 +28,2 @@ this.settings.callback({

}
else {
const element = this.settings.setClassOnElement;
element === null || element === void 0 ? void 0 : element.classList.remove(this.settings.mouseClass || "");
element === null || element === void 0 ? void 0 : element.classList.add(this.settings.touchClass || "");
}
};

@@ -36,2 +36,7 @@ this.mouseMoved = () => {

}
const element = this.settings.setClassOnElement;
if (element) {
element.classList.remove(this.settings.touchClass || "");
element.classList.add(this.settings.mouseClass || "");
}
if (this.settings.callback) {

@@ -43,7 +48,2 @@ this.settings.callback({

}
else {
const element = this.settings.setClassOnElement;
element === null || element === void 0 ? void 0 : element.classList.remove(this.settings.touchClass || "");
element === null || element === void 0 ? void 0 : element.classList.add(this.settings.mouseClass || "");
}
}

@@ -50,0 +50,0 @@ };

@@ -10,2 +10,2 @@ "use strict";

*/
exports.orientationIsLandscape = matchMedia_helper_1.matchMedia("(orientation: landscape)");
exports.orientationIsLandscape = (0, matchMedia_helper_1.matchMedia)("(orientation: landscape)");

@@ -10,2 +10,2 @@ "use strict";

*/
exports.orientationIsPortrait = matchMedia_helper_1.matchMedia("(orientation: portrait)");
exports.orientationIsPortrait = (0, matchMedia_helper_1.matchMedia)("(orientation: portrait)");

@@ -10,2 +10,2 @@ "use strict";

*/
exports.prefersDarkColorScheme = matchMedia_helper_1.matchMedia("(prefers-color-scheme: dark)");
exports.prefersDarkColorScheme = (0, matchMedia_helper_1.matchMedia)("(prefers-color-scheme: dark)");

@@ -10,2 +10,2 @@ "use strict";

*/
exports.prefersReducedMotion = dontMatchMedia_helper_1.dontMatchMedia("(prefers-reduced-motion: no-preference)");
exports.prefersReducedMotion = (0, dontMatchMedia_helper_1.dontMatchMedia)("(prefers-reduced-motion: no-preference)");
{
"name": "@baggie/detection",
"version": "1.3.5",
"version": "1.4.0",
"description": "A library of detection tools for JavaScript and TypeScript. Detect browser support, media features, environment etc.",

@@ -5,0 +5,0 @@ "license": "MIT",

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