(participantId: string)
| 87 | }; |
| 88 | |
| 89 | export const anonymousDisplayName = (participantId: string): string => { |
| 90 | const hash = hashString(participantId); |
| 91 | const adjective = ADJECTIVES[hash % ADJECTIVES.length]; |
| 92 | const animal = ANIMALS[Math.floor(hash / ADJECTIVES.length) % ANIMALS.length]; |
| 93 | return `${adjective} ${animal}`; |
| 94 | }; |
| 95 | |
| 96 | export const anonymousHandle = (participantId: string): string => |
| 97 | anonymousDisplayName(participantId).toLowerCase().replace(/\s+/g, '-'); |
no test coverage detected