MCPcopy
hub / github.com/Pradumnasaraf/DevOps / assert

Function assert

docs/webassembly/files/apps/hello-world/hello.js:278–282  ·  view source on GitHub ↗

@type {function(*, string=)}

(condition, text)

Source from the content-addressed store, hash-verified

276// TODO(sbc): Make this the default even without STRICT enabled.
277/** @type {function(*, string=)} */
278function assert(condition, text) {
279 if (!condition) {
280 abort('Assertion failed' + (text ? ': ' + text : ''));
281 }
282}
283
284// We used to include malloc/free by default in the past. Show a helpful error in
285// builds with assertions.

Callers 12

hello.jsFile · 0.85
writeStackCookieFunction · 0.85
initRuntimeFunction · 0.85
addRunDependencyFunction · 0.85
removeRunDependencyFunction · 0.85
createExportWrapperFunction · 0.85
receiveInstanceFunction · 0.85
ptrToStringFunction · 0.85
printCharFunction · 0.85
UTF8ToStringFunction · 0.85
callMainFunction · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected