source:
node_modules/es-toolkit/dist/util/invariant.mjs@
ba17441
| Last change on this file since ba17441 was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 207 bytes | |
| Line | |
|---|---|
| 1 | function invariant(condition, message) { |
| 2 | if (condition) { |
| 3 | return; |
| 4 | } |
| 5 | if (typeof message === 'string') { |
| 6 | throw new Error(message); |
| 7 | } |
| 8 | throw message; |
| 9 | } |
| 10 | |
| 11 | export { invariant }; |
Note:
See TracBrowser
for help on using the repository browser.
