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

Function WeekdaysParser

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

Source from the content-addressed store, hash-verified

31 }
32
33 function* WeekdaysParser() {
34 let repeats = false;
35
36 const weekdays = new Set<Weekday>();
37
38 let result: { weekday: Weekday, repeats: boolean };
39 result = yield WeekdayParser;
40
41 weekdays.add(result.weekday);
42 repeats = repeats || result.repeats;
43
44 while (result = yield optional(AnotherWeekdayParser)) {
45 weekdays.add(result.weekday);
46 repeats = repeats || result.repeats;
47 }
48
49 return { weekdays, repeats };
50 }
51
52 function* MinutesSuffixParser() {
53 yield ':';

Callers

nothing calls this directly

Calls 1

optionalFunction · 0.90

Tested by

no test coverage detected