MCPcopy Index your code
hub / github.com/nodejs/node / assert

Function assert

lib/internal/console/constructor.js:477–487  ·  view source on GitHub ↗
(expression, ...args)

Source from the content-addressed store, hash-verified

475
476 // Defined by: https://console.spec.whatwg.org/#assert
477 assert(expression, ...args) {
478 if (!expression) {
479 if (args.length && typeof args[0] === 'string') {
480 args[0] = `Assertion failed: ${args[0]}`;
481 } else {
482 ArrayPrototypeUnshift(args, 'Assertion failed');
483 }
484 // The arguments will be formatted in warn() again
485 ReflectApply(this.warn, this, args);
486 }
487 },
488
489 // Defined by: https://console.spec.whatwg.org/#clear
490 clear() {

Callers 15

parseTypeScriptFunction · 0.50
packageMapResolveFunction · 0.50
legacyMainResolveFunction · 0.50
constructorMethod · 0.50
syncLinkMethod · 0.50
#asyncLinkMethod · 0.50
runSyncMethod · 0.50
runMethod · 0.50
constructorMethod · 0.50
runMethod · 0.50
runSyncMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…