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

Function devAssertNumber

src/core/assert/dev.js:132–143  ·  view source on GitHub ↗
(shouldBeNumber, opt_message)

Source from the content-addressed store, hash-verified

130 * @throws {Error} when shouldBeNumber is not an Number
131 */
132export function devAssertNumber(shouldBeNumber, opt_message) {
133 if (mode.isMinified()) {
134 return /** @type {void} */ (shouldBeNumber);
135 }
136 devAssertDceCheck();
137
138 return assertions.assertNumber(
139 /** @type {import('./base').AssertionFunctionDef} */ (devAssert),
140 shouldBeNumber,
141 opt_message
142 );
143}
144
145/**
146 * Throws an error if the first argument is not an array.

Callers 2

applyStaticLayoutFunction · 0.90
checkUpdates_Method · 0.90

Calls 2

devAssertDceCheckFunction · 0.85
assertNumberMethod · 0.80

Tested by

no test coverage detected