| 144 | /** Contiguous ranges from a sorted list of block-start offsets within |
| 145 | * `[blockStart, blockEnd)`: each range runs to the next start (or blockEnd). */ |
| 146 | const rangesFromStarts = (starts: readonly number[], blockEnd: number): ByteRange[] => |
| 147 | starts.map((s, i) => ({ start: s, end: i + 1 < starts.length ? starts[i + 1]! : blockEnd })); |
| 148 | |
| 149 | /** The simple (unquoted) key name on a key line, e.g. `paths`, `schemas`. */ |
| 150 | const keyNameAt = (text: string, lineStart: number, lineEnd: number): string => { |