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

Function userAssertNumber

src/core/assert/user.js:105–111  ·  view source on GitHub ↗
(shouldBeNumber, opt_message)

Source from the content-addressed store, hash-verified

103 * @throws {Error} when shouldBeNumber is not an Number
104 */
105export function userAssertNumber(shouldBeNumber, opt_message) {
106 return assertions.assertNumber(
107 /** @type {import('./base').AssertionFunctionDef} */ (userAssert),
108 shouldBeNumber,
109 opt_message
110 );
111}
112
113/**
114 * Throws an error if the first argument is not an array.

Callers

nothing calls this directly

Calls 1

assertNumberMethod · 0.80

Tested by

no test coverage detected