Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 453 Bytes

invariant.md

File metadata and controls

20 lines (12 loc) · 453 Bytes

invariant

invariant can be replaced by lighter alternatives.

Alternatives

tiny-invariant

tiny-invariant is a tiny, widely-supported, zero-dependency alternative to invariant.

import invariant from 'tiny-invariant';

invariant(truthyValue, 'This should not throw!');

invariant(falsyValue, 'This will throw!');

Project Page npm