MCPcopy Create free account
hub / github.com/outerbase/studio / normalizedPathname

Function normalizedPathname

src/lib/tracking.ts:9–21  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

7}
8
9export function normalizedPathname(pathname: string) {
10 const patterns = {
11 "/playground/mysql/[roomName]": /\/playground\/mysql\/(\w)+/i,
12 };
13
14 for (const [pattern, reg] of Object.entries(patterns)) {
15 if (reg.test(pathname)) {
16 return pattern;
17 }
18 }
19
20 return pathname;
21}
22
23export function sendAnalyticEvents(events: TrackEventItem[]) {
24 if (typeof window === "undefined") {

Callers 2

PageTrackerFunction · 0.90
DatabaseGuiFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected