MCPcopy Index your code
hub / github.com/ampproject/amphtml / assertArray

Method assertArray

src/utils/log.js:470–476  ·  view source on GitHub ↗

* Throws an error if the first argument is not an array. * The array can be empty. * * @param {*} shouldBeArray * @param {!Array|string=} opt_message The assertion message * @return {!Array} The array value * @closurePrimitive {asserts.matchesReturn}

(shouldBeArray, opt_message)

Source from the content-addressed store, hash-verified

468 * @closurePrimitive {asserts.matchesReturn}
469 */
470 assertArray(shouldBeArray, opt_message) {
471 return assertions.assertArray(
472 this.boundAssertFn_,
473 shouldBeArray,
474 opt_message
475 );
476 }
477
478 /**
479 * Throws an error if the first argument isn't a boolean.

Callers 8

test-log.jsFile · 0.80
devAssertArrayFunction · 0.80
userAssertArrayFunction · 0.80
computeListItems_Method · 0.80
isAnchorAdEnabled_Method · 0.80
getInlineData_Method · 0.80
getPageIndex_Method · 0.80
getInlinePages_Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected