UNPKG
@tevm/utils
Version:
latest (1.0.0-next.148)
next (1.0.0-next.39)
2.0.0-next.107
2.0.0-next.105
2.0.0-next.86
2.0.0-next.84
2.0.0-next.80
2.0.0-next.79
1.1.0-next.100
1.1.0-next.97
1.1.0-next.96
1.1.0-next.92
1.1.0-next.91
1.1.0-next.88
1.1.0-next.77
1.1.0-next.75
1.1.0-next.74
1.1.0-next.72
1.1.0-next.70
1.1.0-next.69
1.1.0-next.60
1.1.0-next.52
1.1.0-next.47
1.1.0-next.45
1.0.0-next.148
1.0.0-next.146
1.0.0-next.142
1.0.0-next.131
1.0.0-next.128
1.0.0-next.118
1.0.0-next.117
1.0.0-next.109
1.0.0-next.40
1.0.0-next.39
0.0.0-next.107
A custom implementation of ethereumjs blockchain
github.com/evmts/tevm-monorepo
evmts/tevm-monorepo
@tevm/utils
/
src
/
invariant.ts
8 lines
(6 loc)
•
203 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
import
{
DefensiveNullCheckError
}
from
'@tevm/errors'
export
function
invariant
(
condition: any, error:
Error
=
new
DefensiveNullCheckError()
): asserts condition {
if
(!condition) {
throw
error } }