MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeDisplayName

Function normalizeDisplayName

apps/sim/blocks/integration-matcher.ts:39–44  ·  view source on GitHub ↗

Strips ` (Legacy)` / ` V2` suffixes so the display uses the natural name.

(name: string)

Source from the content-addressed store, hash-verified

37
38/** Strips ` (Legacy)` / ` V2` suffixes so the display uses the natural name. */
39function normalizeDisplayName(name: string): string {
40 return name
41 .replace(/\s*\(legacy\)\s*$/i, '')
42 .replace(/\s+v\d+(\.\d+)*\s*$/i, '')
43 .trim()
44}
45
46let cachedMatcher: IntegrationMatcher | null = null
47let cachedList: readonly IntegrationDescriptor[] | null = null

Callers 1

buildMatcherFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected