ts-tiny-invariant
v2.0.5
Published
Stricter version of tiny-invariant
Downloads
140,678
Readme
ts-tiny-invariant
Stricter version of tiny-invariant that accepts only boolean
condition
Installation
$ npm i ts-tiny-invariant
Usage
import invariant from 'ts-tiny-invariant'
expect(() => {
invariant(false, 'fail')
}).toThrow('Invariant failed: fail')
expect(() => {
invariant(true, 'pass')
}).not.toThrow()