(value: string)
| 31 | const emptyBatch = () => ({ patches: new Map<string, string>(), capped: false }) |
| 32 | |
| 33 | const parseQuotedPath = (value: string) => { |
| 34 | let out = "" |
| 35 | for (let idx = 1; idx < value.length; idx++) { |
| 36 | const char = value[idx] |
| 37 | if (char === '"') return { value: out, end: idx + 1 } |
| 38 | if (char !== "\\") { |
| 39 | out += char |
| 40 | continue |
| 41 | } |
| 42 | |
| 43 | const next = value[++idx] |
| 44 | if (next === "t") out += "\t" |
| 45 | else if (next === "n") out += "\n" |
| 46 | else if (next === "r") out += "\r" |
| 47 | else if (next === '"' || next === "\\") out += next |
| 48 | else out += next ?? "" |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | const parsePathToken = (value: string) => { |
| 53 | if (!value.startsWith('"')) return value.split("\t")[0] |
no outgoing calls
no test coverage detected