MCPcopy Index your code
hub / github.com/BloombergGraphics/whatiscode / assert

Function assert

scripts/libs/esprima.js:218–223  ·  view source on GitHub ↗
(condition, message)

Source from the content-addressed store, hash-verified

216 // Do NOT use this to enforce a certain condition on any user input.
217
218 function assert(condition, message) {
219 /* istanbul ignore if */
220 if (!condition) {
221 throw new Error('ASSERT: ' + message);
222 }
223 }
224
225 function isDecimalDigit(ch) {
226 return (ch >= 0x30 && ch <= 0x39); // 0..9

Callers 8

addCommentFunction · 0.85
scanNumericLiteralFunction · 0.85
scanStringLiteralFunction · 0.85
scanRegExpBodyFunction · 0.85
throwErrorFunction · 0.85
tolerateErrorFunction · 0.85
parseLexicalDeclarationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected