source:
trip-planner-front/node_modules/minimalistic-assert/index.js@
6c1585f
Last change on this file since 6c1585f was 6a3a178, checked in by , 3 years ago | |
---|---|
|
|
File size: 252 bytes |
Line | |
---|---|
1 | module.exports = assert; |
2 | |
3 | function assert(val, msg) { |
4 | if (!val) |
5 | throw new Error(msg || 'Assertion failed'); |
6 | } |
7 | |
8 | assert.equal = function assertEqual(l, r, msg) { |
9 | if (l != r) |
10 | throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); |
11 | }; |
Note:
See TracBrowser
for help on using the repository browser.