MCPcopy Index your code
hub / github.com/TruthHun/BookStack / expect

Method expect

static/katex/katex.mjs:14919–14931  ·  view source on GitHub ↗

* Checks a result to make sure it has the right type, and throws an * appropriate error otherwise.

(text, consume)

Source from the content-addressed store, hash-verified

14917
14918
14919 expect(text, consume) {
14920 if (consume === void 0) {
14921 consume = true;
14922 }
14923
14924 if (this.nextToken.text !== text) {
14925 throw new ParseError("Expected '" + text + "', got '" + this.nextToken.text + "'", this.nextToken);
14926 }
14927
14928 if (consume) {
14929 this.consume();
14930 }
14931 }
14932 /**
14933 * Considers the current look ahead token as consumed,
14934 * and fetches the one after that as the new look ahead.

Callers 7

parseMethod · 0.95
parseStringGroupMethod · 0.95
parseGroupMethod · 0.95
katex.jsFile · 0.80
katex.mjsFile · 0.80
handlerFunction · 0.80
katex.min.jsFile · 0.80

Calls 1

consumeMethod · 0.95

Tested by

no test coverage detected