MCPcopy Create free account
hub / github.com/everx-labs/everdev / passWhile

Method passWhile

src/controllers/contract/param-parser.ts:43–50  ·  view source on GitHub ↗
(test: (c: string) => boolean)

Source from the content-addressed store, hash-verified

41 }
42
43 passWhile(test: (c: string) => boolean): string | undefined {
44 const savePos = this.pos
45
46 while (this.passIf(test)) {} /* eslint-disable-line no-empty */
47 return this.pos > savePos
48 ? this.text.substring(savePos, this.pos)
49 : undefined
50 }
51
52 expectIf(
53 test: (c: string) => boolean,

Callers 2

expectIfMethod · 0.95
parseScalarMethod · 0.95

Calls 1

passIfMethod · 0.95

Tested by

no test coverage detected