/** * Prefixes a single quote to values starting with a spreadsheet formula trigger * (`=`, `+`, `-`, `@`, tab, CR), neutralizing CSV injection in Excel/Sheets. */ export function neutralizeCsvFormula(value: string): string { return /^[=+\-@\t\r]/.test(value) ? `'${value}` : value }