detect-hover
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -6,8 +6,5 @@ 'use strict'; | ||
}); | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var detectHover = { | ||
update: function update() { | ||
if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && typeof window.matchMedia === 'function') { | ||
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') { | ||
detectHover.hover = window.matchMedia('(hover: hover)').matches; | ||
@@ -14,0 +11,0 @@ detectHover.none = window.matchMedia('(hover: none)').matches || window.matchMedia('(hover: on-demand)').matches; |
{ | ||
"name": "detect-hover", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "JavaScript wrapper for hover and any-hover media queries", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
const detectHover = { | ||
update() { | ||
if (typeof window === 'object' && typeof window.matchMedia === 'function') { | ||
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') { | ||
detectHover.hover = window.matchMedia('(hover: hover)').matches; | ||
@@ -5,0 +5,0 @@ detectHover.none = ( |
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
7506
33