MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / assert

Function assert

lib/web/polyfill.js:342–344  ·  view source on GitHub ↗
(condition, msg1, msg2)

Source from the content-addressed store, hash-verified

340// Assertion & errors
341var REDUCE_ERROR = 'Reduce of empty object with no initial value';
342function assert(condition, msg1, msg2){
343 if(!condition)throw TypeError(msg2 ? msg1 + msg2 : msg1);
344}
345function assertDefined(it){
346 if(it == undefined)throw TypeError('Function called on null or undefined');
347 return it;

Callers 14

assertFunctionFunction · 0.85
assertObjectFunction · 0.85
assertInstanceFunction · 0.85
polyfill.jsFile · 0.85
diff_cleanupMergeMethod · 0.85
match_bitapMethod · 0.85
addMethod · 0.85
subMethod · 0.85
divMethod · 0.85
mulMethod · 0.85
convertMethod · 0.85
convertWithStatsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected