Socket
Socket
Sign inDemoInstall

detect-it

Package Overview
Dependencies
4
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.6 to 3.0.7

2

package.json
{
"name": "detect-it",
"version": "3.0.6",
"version": "3.0.7",
"description": "Detect if a device is mouse only, touch only, or hybrid",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -1,8 +0,10 @@

# Detect It
# Detect It - v3
> The most recent version of [`detect-it` is available here](https://github.com/rafgraph/detect-it)
Detect if a device is mouse only, touch only, or hybrid, and if it supports passive event listeners.
[Live detection test][liveDetectionTest]
[Live detection test for v3][liveDetectionTest]
![npm](https://img.shields.io/npm/dm/detect-it)
[![npm](https://img.shields.io/npm/dm/detect-it?label=npm)](https://www.npmjs.com/package/detect-it) [![npm bundle size (version)](https://img.shields.io/bundlephobia/minzip/detect-it/3?color=purple)](https://bundlephobia.com/result?p=detect-it@3)

@@ -13,4 +15,2 @@ Exports a reference to a singleton object (a micro state machine with an update function) with its state set to if the device is mouse only, touch only, or hybrid (and other related info about the device), as well as an `update()` function which updates the object's state.

Note that Detect It has removed support for Pointer Events detection because they're just not relevant enough (support for less than 60% of users, [see Can I Use][canIUsePointerEvents], and not supported by React). If you need Pointer Events detection, use [Detect It v1.1][detectItv1.1].
### `detectIt` micro state machine

@@ -170,3 +170,3 @@ ```javascript

<!-- links -->
[liveDetectionTest]: https://detect-it.rafgraph.dev/
[liveDetectionTest]: https://detect-it-v3.rafgraph.dev/

@@ -173,0 +173,0 @@ [detectHoverRepo]: https://github.com/rafgraph/detect-hover

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc