MCPcopy
hub / github.com/ampproject/amphtml / devAssert

Function devAssert

src/core/assert/dev.js:40–72  ·  view source on GitHub ↗
(
  shouldBeTruthy,
  opt_message,
  opt_1,
  opt_2,
  opt_3,
  opt_4,
  opt_5,
  opt_6,
  opt_7,
  opt_8,
  opt_9
)

Source from the content-addressed store, hash-verified

38 * @throws {Error} when shouldBeTruthy is not truthy.
39 */
40export function devAssert(
41 shouldBeTruthy,
42 opt_message,
43 opt_1,
44 opt_2,
45 opt_3,
46 opt_4,
47 opt_5,
48 opt_6,
49 opt_7,
50 opt_8,
51 opt_9
52) {
53 if (mode.isMinified()) {
54 return /** @type {void} */ (shouldBeTruthy);
55 }
56 devAssertDceCheck();
57
58 return assertions.assert(
59 '',
60 shouldBeTruthy,
61 opt_message,
62 opt_1,
63 opt_2,
64 opt_3,
65 opt_4,
66 opt_5,
67 opt_6,
68 opt_7,
69 opt_8,
70 opt_9
71 );
72}
73
74/**
75 * Throws an error if the first argument isn't an Element.

Callers 15

test-assert.jsFile · 0.90
signalEmit_Method · 0.90
cloneMethod · 0.90
drainText_Method · 0.90
normalizeMethodFunction · 0.90
HeaderShimFunction · 0.90
constructorMethod · 0.90
callbackMethod · 0.90
setupInputFunction · 0.90
setupInitFunction · 0.90
setupJsonFetchInitFunction · 0.90
normalizeMethod_Function · 0.90

Calls 2

devAssertDceCheckFunction · 0.85
assertMethod · 0.80

Tested by

no test coverage detected