MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / normalizePermission

Function normalizePermission

apps/ui/src/hooks/useWebPush.hooks.ts:31–43  ·  view source on GitHub ↗
(
  value: NotificationPermission
)

Source from the content-addressed store, hash-verified

29};
30
31const normalizePermission = (
32 value: NotificationPermission
33): IWebPushPermission => {
34 if (value === "granted") {
35 return "granted";
36 }
37
38 if (value === "denied") {
39 return "denied";
40 }
41
42 return "default";
43};
44
45interface ISerializedSubscription {
46 readonly endpoint: string;

Callers 1

useWebPushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected