(value: string)
| 669 | * Unquoted values pass through unchanged. |
| 670 | */ |
| 671 | export function unwrapQuotedValue(value: string): string { |
| 672 | const trimmed = value.trim(); |
| 673 | if (!isDoubleQuote(trimmed[0])) return value; |
| 674 | // Reuse the list grammar so unwrapping matches splitting exactly (strict |
| 675 | // close, doubled-quote escape). Only a single, fully balanced quoted field is |
| 676 | // unwrapped; anything that falls back to a literal split is left untouched. |
| 677 | const fields = splitQuotedCommaList(trimmed); |
| 678 | if (fields.length === 1 && fields[0] !== trimmed) return fields[0].trim(); |
| 679 | return value; |
| 680 | } |
| 681 | |
| 682 | export function parseValueToken( |
| 683 | raw: string, |
no test coverage detected