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

Function splitName

apps/sim/enrichments/providers.ts:53–57  ·  view source on GitHub ↗
(fullName: unknown)

Source from the content-addressed store, hash-verified

51 * provider falls through to one that accepts a single name string.
52 */
53export function splitName(fullName: unknown): { firstName: string; lastName: string } | null {
54 const parts = str(fullName).split(/\s+/).filter(Boolean)
55 if (parts.length < 2) return null
56 return { firstName: parts[0], lastName: parts.slice(1).join(' ') }
57}
58
59/**
60 * Declares a tool-backed enrichment provider as plain data. Keeping this free of

Callers 1

work-email.tsFile · 0.90

Calls 2

strFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected