Ross ROSS = Recommend OSS · open-source software intelligence for agents

zertosh/invariant

invariant observed · 2026-08-28

github.com/zertosh/invariant · JavaScript · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

32/100

  • Activity 0
  • Release rhythm 35
  • Longevity 100

Flags: no_releases

How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 4361
  • days_rel: n/a
  • days_push: 1724
  • n_releases_24m: 0

Full methodology

Adoption not part of the score

1230 stars · 71 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

A tiny JavaScript library mirroring Facebook's `invariant` helper that throws descriptive errors in development and generic errors in production. It is widely used as a dependency in React ecosystem packages.

Use cases

  • assert a condition is true and throw otherwise
  • provide detailed error messages in dev but generic ones in production
  • strip error messages from production bundles via minification
  • validate function arguments in libraries

When to choose

  • you need a tiny, battle-tested assertion helper compatible with browserify/envify
  • you want dev-only descriptive errors that minify away in production

When to avoid

  • you want rich assertion APIs with many matchers (use chai or assert)
  • you need TypeScript-native assertion functions with type narrowing

Facets

library · maturity maintenance

error-handling testing developer-tools web-development browser cross-platform assertions invariant-condition minification-friendly facebook-mirror javascript nodejs

2 sources

Member repositories

RepositoryRoleHealth v2
zertosh/invariantmain32

For agents

markdown · JSON · MCP: product_card(name="zertosh/invariant")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem