MCPcopy Create free account
hub / github.com/cloudflare/realtimekit-ui / formatName

Function formatName

packages/core/src/utils/string.ts:42–46  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

40 * @returns Name to use in the UI
41 */
42export const formatName = (name: string) => {
43 name = name?.trim();
44 if (name === '') return 'Participant';
45 return name;
46};
47const whiteSpace = new RegExp(/[^\u00BF-\u1FFF\u2C00-\uD7FF\w\s]/, 'g');
48const space = new RegExp(/\s+/);
49

Callers 10

RtkAvatarClass · 0.90
meetingChangedMethod · 0.90
renderPeerMethod · 0.90
ChatHeadFunction · 0.90
renderPeerMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected