</>PackageGraphPackageGraph

invariant

npmv2.2.4

invariant

28.3M
Weekly downloads
8
Dependents
4
Dependencies
97/100
Popularity

Overview

invariant is an npm package that invariant. It is extremely widely used, with about 28.3M downloads per week and 8 known dependents in the graph. The latest version is 2.2.4, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need invariant and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (28.3M weekly downloads).
  • Clear open-source license (MIT).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Relationship graph

Dependencies (left) and dependents (right) of invariant.

Dependencies

Dev (3)

browserify ^11.0.1flow-bin ^0.67.1tap ^1.4.0

Used by

Popular packages that depend on invariant.

Alternatives to invariant

p-locatenpm

Get the first fulfilled promise that satisfies the provided testing function

267.3M/wk1 dependentsMITTS
ci-infonpm

Get details about the current Continuous Integration environment

116M/wk3 dependentsMITTS
is-globnpm

Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet

0/wk2 dependentsMIT
@jest/corenpm

Delightful JavaScript Testing.

0/wk2 dependentsMITTS
@vitest/expectnpm

Jest's expect matchers as a Chai plugin

0/wk1 dependentsMITTS
expect-typenpm

[![CI](https://github.com/mmkal/expect-type/actions/workflows/ci.yml/badge.svg)](https://github.com/mmkal/expect-type/actions/workflows/ci.yml) ![npm](https://img.shields.io/npm/dt/expect-type) [![X Follow](https://img.shields.io/twitter/follow/mmkal)](ht

0/wk3 dependentsApache-2.0TS
@vitest/mockernpm

Vitest module mocker implementation

0/wk3 dependentsMITTS
@vitest/snapshotnpm

Vitest snapshot manager

0/wk1 dependentsMITTS
@vitest/runnernpm

Vitest test runner

0/wk4 dependentsMITTS
why-is-node-runningnpm

Node is running but you don't know why? why-is-node-running is here to help you.

0/wk1 dependentsMITTS
@vitest/pretty-formatnpm

Fork of pretty-format with support for ESM

0/wk3 dependentsMITTS
jest-clinpm

Delightful JavaScript Testing.

0/wk2 dependentsMITTS

Frequently installed together

Version history

VersionPublishedLicense
2.2.4latest8 years agoMIT
2.2.38 years agoMIT
2.2.29 years agoBSD-3-Clause
2.2.110 years agoBSD-3-Clause
2.2.010 years agoBSD-3-Clause
2.1.310 years agoBSD-3-Clause
2.1.210 years agoBSD-3-Clause
2.1.110 years agoBSD-4-Clause
2.1.011 years agoBSD
2.0.011 years agoMIT
1.0.211 years agoMIT
1.0.111 years agoMIT
1.0.011 years agoMIT

Maintainers

Keywords

Frequently asked questions

How do I install invariant?

Run `npm install invariant` to add invariant to your npm project.

What license is invariant released under?

invariant is distributed under the MIT license.

How popular is invariant?

invariant has approximately 28,340,950 downloads per week and 8 known dependent packages.