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

Function extractDisplayName

apps/sim/app/api/webhooks/agentmail/route.ts:365–374  ·  view source on GitHub ↗
(from: string)

Source from the content-addressed store, hash-verified

363}
364
365function extractDisplayName(from: string): string | null {
366 const openBracket = from.indexOf('<')
367 if (openBracket <= 0) return null
368 const name = from.substring(0, openBracket).trim()
369 if (!name) return null
370 if (name.startsWith('"') && name.endsWith('"')) {
371 return name.slice(1, -1) || null
372 }
373 return name
374}

Callers 2

route.tsFile · 0.85
createRejectedTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected