MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / rangesFromStarts

Function rangesFromStarts

packages/plugins/openapi/src/sdk/split.ts:146–147  ·  view source on GitHub ↗
(starts: readonly number[], blockEnd: number)

Source from the content-addressed store, hash-verified

144/** Contiguous ranges from a sorted list of block-start offsets within
145 * `[blockStart, blockEnd)`: each range runs to the next start (or blockEnd). */
146const 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`. */
150const keyNameAt = (text: string, lineStart: number, lineEnd: number): string => {

Callers 1

structuralSplitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected