(j: number)
| 396 | return j + 1; |
| 397 | }; |
| 398 | const skipValue = (j: number): number => { |
| 399 | let depth = 0; |
| 400 | for (; j < text.length; j++) { |
| 401 | const ch = text[j]!; |
| 402 | if (ch === '"' || ch === "'" || ch === '`') { j = skipString(j) - 1; continue; } |
| 403 | if (ch === '{' || ch === '[' || ch === '(') depth++; |
| 404 | else if (ch === '}' || ch === ']' || ch === ')') { if (depth === 0) return j; depth--; } |
| 405 | else if (ch === ',' && depth === 0) return j; |
| 406 | } |
| 407 | return j; |
| 408 | }; |
| 409 | let i = at + 1; |
| 410 | while (i < text.length) { |
| 411 | const m = /^\s*(?:([A-Za-z_$][\w$]*)|["']([^"']+)["'])\s*:\s*/.exec(text.slice(i)); |
no test coverage detected