MCPcopy
hub / github.com/hapijs/hapi / _assert

Method _assert

lib/route.js:343–360  ·  view source on GitHub ↗
(condition, message)

Source from the content-addressed store, hash-verified

341 }
342
343 _assert(condition, message) {
344
345 if (condition) {
346 return;
347 }
348
349 if (this.method[0] !== '_') {
350 message = `${message}: ${this.method.toUpperCase()} ${this.path}`;
351 }
352
353 throw new Assert.AssertionError({
354 message,
355 actual: false,
356 expected: true,
357 operator: '==',
358 stackStartFunction: this._assert
359 });
360 }
361};
362
363

Callers 2

constructorMethod · 0.80
_setupValidationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected