MCPcopy Index your code
hub / github.com/21st-dev/1code / isOptedOut

Function isOptedOut

src/renderer/lib/analytics.ts:28–35  ·  view source on GitHub ↗

* Check if user has opted out of analytics * Reads directly from localStorage to avoid circular dependencies

()

Source from the content-addressed store, hash-verified

26 * Reads directly from localStorage to avoid circular dependencies
27 */
28function isOptedOut(): boolean {
29 try {
30 const optOut = localStorage.getItem("preferences:analytics-opt-out")
31 return optOut === "true"
32 } catch {
33 return false
34 }
35}
36
37/**
38 * Get common properties for all events

Callers 2

captureFunction · 0.85
identifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected