@dreamworld/web-util
Advanced tools
Comparing version 1.4.6-update-touch-logic.1 to 1.4.6-update-touch-logic.2
@@ -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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14273
265
2
+ Addedlodash-es@^4.17.21
+ Addedlodash-es@4.17.21(transitive)