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

Function assertNumber

src/core/assert/base.js:171–179  ·  view source on GitHub ↗
(assertFn, shouldBeNumber, opt_message)

Source from the content-addressed store, hash-verified

169 * @throws {Error} when shouldBeNumber is not an Number
170 */
171export function assertNumber(assertFn, shouldBeNumber, opt_message) {
172 return assertType_(
173 assertFn,
174 shouldBeNumber,
175 typeof shouldBeNumber == 'number',
176 'Number expected',
177 opt_message
178 );
179}
180
181/**
182 * Throws an error if the first argument is not an array.

Callers

nothing calls this directly

Calls 1

assertType_Function · 0.85

Tested by

no test coverage detected