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

Function userAssert

src/video-iframe-integration.js:36–41  ·  view source on GitHub ↗

* @param {T} shouldBeTrueish * @param {...*} args * @return {T} * @template T

(shouldBeTrueish, ...args)

Source from the content-addressed store, hash-verified

34 * @template T
35 */
36function userAssert(shouldBeTrueish, ...args) {
37 if (!shouldBeTrueish) {
38 throw new Error(`[${TAG}] ${args.join(' ')} ${DOCS_URL}`);
39 }
40 return shouldBeTrueish;
41}
42
43const validMethods = [
44 'pause',

Callers 5

getVideoJsFunction · 0.70
methodMethod · 0.70
listenToMethod · 0.70
getJwplayer_Method · 0.70
adoptFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected