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

Function cleanTitle

packages/shared/src/hooks/useRecentPages.ts:39–40  ·  view source on GitHub ↗
(title: string)

Source from the content-addressed store, hash-verified

37
38const brandSuffix = /\s*[|·\-–—]\s*daily\.dev\s*$/i;
39const cleanTitle = (title: string): string =>
40 title.replace(brandSuffix, '').trim();
41
42// Classify by the route template (router.pathname), not the resolved URL — only
43// the template distinguishes a user profile (`/[userId]`) from other top-level

Callers 1

captureFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected