source:
frontend/node_modules/minimalistic-assert/index.js
| Last change on this file was 9af201e, checked in by , 11 days 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.
