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

@dreamworld/web-util

Package Overview
Dependencies
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dreamworld/web-util - npm Package Compare versions

Comparing version 1.4.6-update-touch-logic.1 to 1.4.6-update-touch-logic.2

16

isTouchDevice.js

@@ -1,13 +0,15 @@

import once from 'lodash-es/once';
import Bowser from "bowser";
const bowser = Bowser.parse(window.navigator.userAgent);
/**
* Detect touch device.
*/
export const isTouchDevice = () => {
return ('ontouchstart' in window) ||
(navigator.maxTouchPoints > 0) ||
(navigator.msMaxTouchPoints > 0) ||
bowser.platform.type !== 'desktop' ? true : false;
}
export const isTouchDevice = once(() => {
return ('ontouchstart' in window) ||
(navigator.maxTouchPoints > 0) ||
(navigator.msMaxTouchPoints > 0) ||
bowser.platform.type !== 'desktop' ? true : false;
}
)
{
"name": "@dreamworld/web-util",
"version": "1.4.6-update-touch-logic.1",
"version": "1.4.6-update-touch-logic.2",
"description": "",

@@ -25,3 +25,4 @@ "main": "index.js",

"dependencies": {
"bowser": "^2.11.0"
"bowser": "^2.11.0",
"lodash-es": "^4.17.21"
},

@@ -28,0 +29,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