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

Function assertArray

src/core/assert/base.js:193–201  ·  view source on GitHub ↗
(assertFn, shouldBeArray, opt_message)

Source from the content-addressed store, hash-verified

191 * @throws {Error} when shouldBeArray is not an Array
192 */
193export function assertArray(assertFn, shouldBeArray, opt_message) {
194 return assertType_(
195 assertFn,
196 shouldBeArray,
197 isArray(shouldBeArray),
198 'Array expected',
199 opt_message
200 );
201}
202
203/**
204 * Throws an error if the first argument isn't a boolean.

Callers

nothing calls this directly

Calls 2

assertType_Function · 0.85
isArrayFunction · 0.85

Tested by

no test coverage detected