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

Function ESModuleParser

src/modules.test.ts:166–176  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164 // }
165
166 function* ESModuleParser() {
167 const lines: Array<unknown> = [];
168 while (yield hasMore) {
169 yield /^[\s;]*/;
170 lines.push(
171 yield [ConstStatement, ImportStatement, ExportStatement, FunctionParser]
172 );
173 yield /^[\s;]*/;
174 }
175 return lines;
176 }
177
178 it('accepts empty string', () => {
179 expect(parse('', ESModuleParser())).toEqual({

Callers 3

modules.test.tsFile · 0.85
exportsFunction · 0.85
lookupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected