npm package
Homeinvariant
The `invariant` package provides a way to enforce conditions in your code, throwing descriptive errors in development and generic errors in production. It is useful for ensuring that certain conditions hold true during execution, particularly in environments like React and Flux.
- lurq health score
- 42/100
- Confidence
- unproven
- Weekly downloads
- 24,459,900
- Latest version
- 2.2.4
- Last release
- Mar 13, 2018
- License
- MIT
Should you depend on invariant?
lurq's verdict: low
- No known advisories
Check this from your coding agent
This page is a daily snapshot. lurq's verify tool checks invariant at the exact version your agent is about to install, and compat checks it against the rest of your stack. One command connects Claude Code, Cursor, VS Code and other agents:
npx lurqrun
Free to start. Quickstart
Upgrading invariant
What each major version removed, renamed or re-signatured, from lurq's extraction of the published packages.
- 1.0.2 → 2.2.4diff ready
Other testing packages lurq scores
- fast-check94/100 · proven
- marked93/100 · proven
- @middy/util93/100 · proven
- jsdom90/100 · proven
- mocha90/100 · proven
Scored from public signals (npm registry, GitHub, deps.dev and advisory databases). Data as of Sep 16, 2026; this page refreshes every 168 hours. Source repository.