MCPcopy Create free account
hub / github.com/dailydotdev/apps / hostOf

Function hostOf

packages/shared/src/components/shell/ReadingDrawer.tsx:124–133  ·  view source on GitHub ↗
(url?: string)

Source from the content-addressed store, hash-verified

122};
123
124const hostOf = (url?: string): string => {
125 if (!url) {
126 return '';
127 }
128 try {
129 return new URL(url).host.replace(/^www\./, '');
130 } catch {
131 return '';
132 }
133};
134
135interface MenuRowProps {
136 icon: ReactNode;

Callers 1

ReadingDrawerFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected