Gathering detailed insights and metrics for browser-has-hover
Gathering detailed insights and metrics for browser-has-hover
Gathering detailed insights and metrics for browser-has-hover
Gathering detailed insights and metrics for browser-has-hover
npm install browser-has-hover
Typescript
Module System
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
11 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Dec 22, 2022
Latest Version
1.0.0
Package Id
browser-has-hover@1.0.0
Unpacked Size
44.93 kB
Size
13.26 kB
File Count
5
NPM Version
6.0.1
Node Version
9.9.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
6
Adds a has-hover
class to the body if the user can hover with their device (i.e. not a touch device), which allows you to write conditional CSS to only apply hover pseudo selectors if the has-hover
class exists, preventing the double click issue on touch devices. Also exposes a hasHover
constant to be used in your JavaScript.
You can install via npm or yarn.
1npm install --save browser-has-hover
1yarn add browser-has-hover
You can import using ES6 imports. You can just import the library if you only want it to add the has-hover
class to the body.
1import 'browser-has-hover';
1.button { 2 // button styles 3} 4 5.has-hover .button:hover { 6 // button styles for hover 7}
If you need to know whether the browser has hover from your JavaScript you can import the constant like so:
1import { hasHover } 'browser-has-hover'; 2 3if (hasHover) { 4 // Do stuff for if the browser has hover 5}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
9 existing vulnerabilities detected
Details
Reason
Found 0/9 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More