// todo optimize export function decodeEmojis(text: string | undefined): string { if (!text) return ""; const regex = /\\u{([^}]+)}/g; const decodedText = text.replace(regex, (_: string, hex: string) => String.fromCodePoint(parseInt(hex, 16))); return decodedText; }