rollup-plugin-inline-invariant
v2.0.0
Published
If you use the [`invariant`](https://npm.im/invariant) library, then this rollup plugin is the plugin for you!
Downloads
2
Readme
rollup-plugin-inline-invairant
If you use the invariant
library, then this rollup plugin is the plugin for you!
This transforms any invariant()
callsite to the native throw
equivalent:
// Before
invariant(foo, "Foo isnt available!")
// After
if (!(foo)) { throw new Error("invariant: Foo isnt available!"); }