1 | const c = require('chalk')
|
2 | const { exit } = require('shelljs')
|
3 |
|
4 | const symbols = require('./symbols')
|
5 |
|
6 | const invariant = (test, message) => {
|
7 | if (test) {
|
8 | console.error(c.red(`${symbols.error} [ERROR] ${message}`))
|
9 | exit(1)
|
10 | }
|
11 | }
|
12 |
|
13 | module.exports = invariant
|