MCPcopy Index your code
hub / github.com/zxlie/FeHelper / eatString

Function eatString

apps/code-beautify/content-script.js:21–29  ·  view source on GitHub ↗
(comma)

Source from the content-addressed store, hash-verified

19 let peek = () => source_text.charAt(pos + 1);
20
21 let eatString = (comma) => {
22 let start = pos;
23 while (next()) {
24 if (ch === "\\") { next(); next(); }
25 else if (ch === comma) { break; }
26 else if (ch === "\n") { break; }
27 }
28 return source_text.substring(start, pos + 1);
29 };
30
31 let eatWhitespace = () => { let start = pos; while (whiteRe.test(peek())) pos++; return pos !== start; };
32 let skipWhitespace = () => { let start = pos; do {} while (whiteRe.test(next())); return pos !== start + 1; };

Callers 1

cssBeautifyFunction · 0.70

Calls 1

nextFunction · 0.70

Tested by

no test coverage detected