Asserts if the expression is false, does nothing in release builds * Halts execution if the assert fails and throws an error * @param {boolean} assert * @param {...Object} output - error message output * @memberof Debug
(assert, ...output)
| 55 | * @param {...Object} output - error message output |
| 56 | * @memberof Debug */ |
| 57 | function ASSERT(assert, ...output) |
| 58 | { |
| 59 | if (assert) return; |
| 60 | console.assert(assert, ...output) |
| 61 | throw new Error('Assert failed!'); // halt execution |
| 62 | } |
| 63 | |
| 64 | /** Log to console if debug is enabled, does nothing in release builds |
| 65 | * @param {...Object} output - message output |
no outgoing calls
no test coverage detected