MCPcopy Create free account
hub / github.com/block/buzz / parseProfilePanelTab

Function parseProfilePanelTab

desktop/src/features/profile/ui/UserProfilePanelUtils.ts:76–86  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

74}
75
76export function parseProfilePanelTab(value: unknown): ProfilePanelTab | null {
77 if (typeof value !== "string") {
78 return null;
79 }
80
81 if (PROFILE_PANEL_TABS.has(value as ProfilePanelTab)) {
82 return value as ProfilePanelTab;
83 }
84
85 return null;
86}
87
88export function profilePanelTabFromSearch(value: unknown): ProfilePanelTab {
89 return parseProfilePanelTab(value) ?? "info";

Callers 5

validateAgentsSearchFunction · 0.90
validatePulseSearchFunction · 0.90
validateChannelSearchFunction · 0.90

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected