2.0.0 • Published 4 years ago

rollup-plugin-inline-invariant v2.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

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!"); }