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

Function IPAddress

src/index.test.ts:326–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324 }
325
326 function* IPAddress() {
327 const first = yield Digit;
328 yield '.';
329 const second = yield Digit;
330 yield '.';
331 const third = yield Digit;
332 yield '.';
333 const fourth = yield Digit;
334 yield mustEnd;
335 return [first, second, third, fourth];
336 }
337
338 it('accepts valid IP addresses', () => {
339 expect(parse('1.2.3.4', IPAddress())).toEqual({

Callers 1

index.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected