source:
trip-planner-front/node_modules/minimalistic-assert/index.js@
eed0bf8
Last change on this file since eed0bf8 was 6a3a178, checked in by , 3 years ago | |
---|---|
|
|
File size: 252 bytes |
Rev | Line | |
---|---|---|
[6a3a178] | 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.