MCPcopy Index your code
hub / github.com/ampproject/amphtml / devAssertBoolean

Function devAssertBoolean

src/core/assert/dev.js:179–190  ·  view source on GitHub ↗
(shouldBeBoolean, opt_message)

Source from the content-addressed store, hash-verified

177 * @throws {Error} when shouldBeBoolean is not an Boolean
178 */
179export function devAssertBoolean(shouldBeBoolean, opt_message) {
180 if (mode.isMinified()) {
181 return /** @type {void} */ (shouldBeBoolean);
182 }
183 devAssertDceCheck();
184
185 return assertions.assertBoolean(
186 /** @type {import('./base').AssertionFunctionDef} */ (devAssert),
187 shouldBeBoolean,
188 opt_message
189 );
190}

Callers

nothing calls this directly

Calls 2

devAssertDceCheckFunction · 0.85
assertBooleanMethod · 0.80

Tested by

no test coverage detected