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

Function WeekdayParser

src/natural-dates.test.ts:14–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12 type Weekday = (typeof weekdayChoices)[0 | 1 | 2 | 3 | 4 | 5 | 6];
13
14 function* WeekdayParser() {
15 let repeats: boolean = yield has(/^every\b/);
16 yield optional(/^next\b/);
17
18 yield whitespaceOptional;
19
20 const weekday: Weekday = yield weekdayChoices;
21 repeats = repeats || (yield has(/^[s]\b/));
22
23 return { weekday, repeats };
24 }
25
26 function* AnotherWeekdayParser() {
27 yield whitespaceOptional;

Callers

nothing calls this directly

Calls 2

hasFunction · 0.90
optionalFunction · 0.90

Tested by

no test coverage detected