MCPcopy Index your code
hub / github.com/JavaScriptRegenerated/yieldparser / lookAhead

Function lookAhead

src/index.ts:160–165  ·  view source on GitHub ↗
(regex: RegExp)

Source from the content-addressed store, hash-verified

158}
159
160export function lookAhead(regex: RegExp) {
161 const lookAheadRegex = new RegExp(`^(?=${regex.source})`);
162 return function* () {
163 return yield lookAheadRegex;
164 };
165}
166
167////////
168

Callers 1

RulesParserFunction · 0.90

Calls

no outgoing calls

Tested by 1

RulesParserFunction · 0.72