'use client' export function isEscaped(value: string, index: number) { let slashCount = 0 for (let offset = index - 1; offset >= 0 && value[offset] === '\\'; offset--) { slashCount++ } return slashCount % 2 === 1 }