(fullName: unknown)
| 51 | * provider falls through to one that accepts a single name string. |
| 52 | */ |
| 53 | export 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 |
no test coverage detected