MCPcopy Create free account
hub / github.com/ampproject/amphtml / assertBoolean

Function assertBoolean

src/core/assert/base.js:214–222  ·  view source on GitHub ↗
(assertFn, shouldBeBoolean, opt_message)

Source from the content-addressed store, hash-verified

212 * @throws {Error} when shouldBeBoolean is not an Boolean
213 */
214export function assertBoolean(assertFn, shouldBeBoolean, opt_message) {
215 return assertType_(
216 assertFn,
217 shouldBeBoolean,
218 !!shouldBeBoolean === shouldBeBoolean,
219 'Boolean expected',
220 opt_message
221 );
222}

Callers

nothing calls this directly

Calls 1

assertType_Function · 0.85

Tested by

no test coverage detected