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

react-user-agent-client-hints

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-user-agent-client-hints - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "react-user-agent-client-hints",
"version": "0.1.0",
"version": "0.1.1",
"description": "",

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

@@ -1,2 +0,2 @@

# React User Agent Data
# React User Agent Client Hints

@@ -19,3 +19,3 @@ Hook for getting information about the browser and operating system of a user.

```sh
$ npm install react-user-agent-data
$ npm install react-user-agent-client-hints
```

@@ -26,6 +26,6 @@

```ts
import { useUserAgentData, Hint } from "react-user-agent-data"
import { useUserAgentClientHints, Hint } from "react-user-agent-client-hints"
/*
* An array containing the hints to be returned.
* An array containing the hints to be returned. Declare in a useMemo or in module scope for referential stability.
*/

@@ -48,9 +48,9 @@ const hints: Hint[] = useMemo(

*/
const highEntropyData = useUserAgentData({ entropy: "high", hints })
const highEntropy = useUserAgentClientHints({ entropy: "high", hints })
/*
* Low entropy runs sync, but does not reveal enough information
* Low entropy runs sync, but potentially does not reveal enough information
* able to identify a user.
*/
const lowEntropyData = useUserAgentData({ entropy: "low" })
const lowEntropy = useUserAgentClientHints({ entropy: "low" })
```

@@ -57,0 +57,0 @@

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