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

Function devAssertArray

src/core/assert/dev.js:156–167  ·  view source on GitHub ↗
(shouldBeArray, opt_message)

Source from the content-addressed store, hash-verified

154 * @throws {Error} when shouldBeArray is not an Array
155 */
156export function devAssertArray(shouldBeArray, opt_message) {
157 if (mode.isMinified()) {
158 return /** @type {void} */ (shouldBeArray);
159 }
160 devAssertDceCheck();
161
162 return assertions.assertArray(
163 /** @type {import('./base').AssertionFunctionDef} */ (devAssert),
164 shouldBeArray,
165 opt_message
166 );
167}
168
169/**
170 * Throws an error if the first argument isn't a boolean.

Callers

nothing calls this directly

Calls 2

devAssertDceCheckFunction · 0.85
assertArrayMethod · 0.80

Tested by

no test coverage detected