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

Method assertNumber

src/utils/log.js:453–459  ·  view source on GitHub ↗

* Throws an error if the first argument isn't a number. The allowed values * include `0` and `NaN`. * * For more details see `assert`. * * @param {*} shouldBeNumber * @param {!Array|string=} opt_message The assertion message * @return {number} The number value. The allowed value

(shouldBeNumber, opt_message)

Source from the content-addressed store, hash-verified

451 * @closurePrimitive {asserts.matchesReturn}
452 */
453 assertNumber(shouldBeNumber, opt_message) {
454 return assertions.assertNumber(
455 this.boundAssertFn_,
456 shouldBeNumber,
457 opt_message
458 );
459 }
460
461 /**
462 * Throws an error if the first argument is not an array.

Callers 15

input.jsFile · 0.80
input.jsFile · 0.80
test-log.jsFile · 0.80
devAssertNumberFunction · 0.80
userAssertNumberFunction · 0.80
whenWithinViewportMethod · 0.80
whenWithinViewportMethod · 0.80
getStartTimeMethod · 0.80
buildCallbackMethod · 0.80
layoutCallbackMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected