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

Function indentOf

packages/plugins/openapi/src/sdk/split.ts:66–70  ·  view source on GitHub ↗
(text: string, lineStart: number, lineEnd: number)

Source from the content-addressed store, hash-verified

64
65/** Count of leading spaces on the line starting at `lineStart`. */
66const indentOf = (text: string, lineStart: number, lineEnd: number): number => {
67 let i = lineStart;
68 while (i < lineEnd && text.charCodeAt(i) === SPACE) i++;
69 return i - lineStart;
70};
71
72/** True for a blank (whitespace-only) or comment line. */
73const isBlankOrComment = (text: string, contentStart: number, lineEnd: number): boolean =>

Callers 2

lineAtFunction · 0.85
keyNameAtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected