MCPcopy Create free account
hub / github.com/arktypeio/arktype / shiftUntil

Method shiftUntil

ark/util/scanner.ts:82–89  ·  view source on GitHub ↗
(condition: Scanner.UntilCondition)

Source from the content-addressed store, hash-verified

80 }
81
82 shiftUntil(condition: Scanner.UntilCondition): string {
83 let shifted = ""
84 while (this.peek) {
85 if (condition(this, shifted)) break
86 else shifted += this.shift()
87 }
88 return shifted
89 }
90
91 /**
92 * shifts until condition holds, reading `\` before the terminator as the

Callers 2

shiftUntilNextMethod · 0.95
skipSpaceMethod · 0.95

Calls 2

shiftMethod · 0.95
conditionFunction · 0.85

Tested by

no test coverage detected