MCPcopy
hub / github.com/ampproject/amphtml / devAssertDceCheck

Function devAssertDceCheck

src/core/assert/dev.js:16–21  ·  view source on GitHub ↗

* This will never execute regardless, but will be included on unminified builds * builds. It will be DCE'd away from minified builds, and so can be used to * validate that Babel is properly removing dev assertions in minified builds.

()

Source from the content-addressed store, hash-verified

14 * validate that Babel is properly removing dev assertions in minified builds.
15 */
16function devAssertDceCheck() {
17 if (self.__AMP_ASSERTION_CHECK) {
18 console /*OK*/
19 .log('__devAssert_sentinel__');
20 }
21}
22
23/**
24 * Throws an error if the first argument isn't trueish. Mirrors devAssert in

Callers 6

devAssertFunction · 0.85
devAssertElementFunction · 0.85
devAssertStringFunction · 0.85
devAssertNumberFunction · 0.85
devAssertArrayFunction · 0.85
devAssertBooleanFunction · 0.85

Calls 1

logMethod · 0.45

Tested by

no test coverage detected