matrix-public-archive/shared/lib/assert.js

11 lines
189 B
JavaScript
Raw Normal View History

2022-02-15 20:33:31 -07:00
'use strict';
function assert(value, message) {
console.assert(value, message);
if (!value) {
throw new Error(`Assertion Error: ${value} == true`);
}
}
module.exports = assert;