MCPcopy
hub / github.com/callstack/agent-device / skipUntil

Method skipUntil

src/utils/xml.ts:253–259  ·  view source on GitHub ↗
(token: string, errorMessage: string)

Source from the content-addressed store, hash-verified

251 }
252
253 private skipUntil(token: string, errorMessage: string): void {
254 // Opening markup tokens are longer than or equal to their closing tokens here, so
255 // this skips past the opening token without missing a valid overlapping close.
256 const endIndex = this.xml.indexOf(token, this.index + token.length);
257 if (endIndex === -1) throw new Error(errorMessage);
258 this.index = endIndex + token.length;
259 }
260
261 private skipWhitespace(): void {
262 while (this.index < this.xml.length && isXmlWhitespace(this.xml[this.index])) {

Callers 1

resolveMarkupReaderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected