Files
documenso/packages/lib/client-only/recipient-initials.ts
2023-06-25 14:23:18 +00:00

7 lines
165 B
TypeScript

export const initials = (text: string) =>
text
?.split(' ')
.map((name: string) => name.slice(0, 1).toUpperCase())
.slice(0, 2)
.join('') ?? 'UK';