</>PackageGraphPackageGraph

outvariant

npmv1.4.3TypeScript

Type-safe implementation of invariant with positionals.

Adopt with care

outvariant is usable, with caveats. Last published 796 days ago.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • DMaintenance: grade D, Poor — a real concern.

    Last published 796 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 23 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding outvariant to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

23 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
No constraint declared
Module format
ESM + CommonJS
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the outvariant README.

// Regular invariant:
invariant(user, 'Failed to fetch')
user?.firstName // "user" is possibly undefined

// Outvariant:
invariant(user, 'Failed to fetch')
user.firstName // OK, "invariant" ensured the "user" exists

outvariant vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
outvariantthis page03MIT2 years ago
verror19.8M1MIT1 day ago
invariant016MIT1 day ago
nullthrows013MIT1 day ago

Dependencies

Declared by outvariant v1.4.3. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (8)

@ossjs/release ^0.8.0@types/jest ^26.0.23jest ^27.0.6rimraf ^3.0.2ts-jest ^27.0.3ts-node ^10.0.0tsup ^6.2.3typescript ^4.3.4

Used by

Popular packages that depend on outvariant.

Relationship graph

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

@mswjs/intercepto…msw@open-draft/loggeroutvariant
outvariant dependencies dependents

Frequently installed together

Release history

No releases in the last two years, typically about 2 days apart.

Recent versions of outvariant
VersionPublishedSizeLicense
1.4.3latest2 years ago23 KBMIT
1.4.22 years ago22 KBMIT
1.4.12 years ago22 KBMIT
1.4.03 years ago22 KBMIT
1.3.04 years ago11 KBMIT
1.2.15 years ago8.5 KBMIT
1.2.05 years ago6.5 KBMIT
1.1.05 years ago4.8 KBMIT
1.0.55 years ago5.1 KBMIT
1.0.45 years ago5.0 KBMIT
1.0.35 years ago4.1 KBMIT
1.0.25 years ago3.3 KBMIT
1.0.15 years ago1.2 KBMIT
1.0.05 years ago4.8 KBMIT

Overview

outvariant is an npm package that type-safe implementation of invariant with positionals. It has 3 known dependents in the graph. The latest version is 1.4.3, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need type-safe implementation of invariant with positionals and value a focused solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • No significant drawbacks detected from available metadata.

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

Maintainers

Keywords

Frequently asked questions

Should I use outvariant?

outvariant is usable, with caveats. Last published 796 days ago.

How do I install outvariant?

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

What license is outvariant released under?

outvariant is distributed under the MIT license.

How popular is outvariant?

npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on outvariant.

Is outvariant still maintained?

The most recent release of outvariant (v1.4.3) was published 2 years ago.

Does outvariant run install scripts?

No. outvariant does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.