react-user-agent-client-hints
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"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 @@ |
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
17023