2026-01-19 12:56:16 +01:00

9 lines
334 B
TypeScript

// HOT nur, wenn es wirklich am String-Anfang steht (keine trimStart-Magie)
const HOT_RE = /^HOT[ \u00A0]+/i
const normSpaces = (s: string) => String(s || '').replaceAll('\u00A0', ' ')
export const isHotName = (s: string) => HOT_RE.test(normSpaces(s))
export const stripHotPrefix = (s: string) => normSpaces(s).replace(HOT_RE, '')