MCPcopy
hub / github.com/jquery/esprima / assert

Function assert

src/assert.ts:6–11  ·  view source on GitHub ↗
(condition: boolean, message: string)

Source from the content-addressed store, hash-verified

4// Do NOT use this to enforce a certain condition on any user input.
5
6export function assert(condition: boolean, message: string): void {
7 /* istanbul ignore if */
8 if (!condition) {
9 throw new Error('ASSERT: ' + message);
10 }
11}

Callers 9

scanNumericLiteralMethod · 0.90
scanStringLiteralMethod · 0.90
scanRegExpBodyMethod · 0.90
throwErrorMethod · 0.90
tolerateErrorMethod · 0.90
parseTemplateHeadMethod · 0.90
parseNewExpressionMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…