MCPcopy
hub / github.com/CesiumGS/cesium / assert

Function assert

packages/engine/Source/Core/assert.js:21–25  ·  view source on GitHub ↗

* Checks that a condition is truthy, throwing a specified message if condition * fails. The `asserts condition` return type allows TypeScript to narrow the * types of the condition and enforce stricter types without further if/else * checks or nullish coalescing. * * @example * assert(object.o

(condition, msg)

Source from the content-addressed store, hash-verified

19 * @ignore
20 */
21function assert(condition, msg) {
22 if (!condition) {
23 throw new DeveloperError(msg);
24 }
25}
26
27export default assert;

Callers 15

VertexArray.jsFile · 0.50
cloneMethod · 0.50
addMethod · 0.50
cloneMethod · 0.50
setPositionsMethod · 0.50
setPositionsMethod · 0.50
setHolesMethod · 0.50
_getPositionsRangeMethod · 0.50
setTrianglesMethod · 0.50
setPositionMethod · 0.50
cloneMethod · 0.50

Calls

no outgoing calls

Tested by 3

testFunction · 0.40
testFunction · 0.40
testFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…