outvariant
npmv1.4.3TypeScriptType-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.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
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" existsoutvariant vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| outvariantthis page | 0 | 3 | MIT | 2 years ago |
| verror | 19.8M | 1 | MIT | 1 day ago |
| invariant | 0 | 16 | MIT | 1 day ago |
| nullthrows | 0 | 13 | MIT | 1 day ago |
Dependencies
Declared by outvariant v1.4.3. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (8)
Used by
Popular packages that depend on outvariant.
Low-level network interception library for Node.js.
Seamless REST/GraphQL API mocking library for browser and Node.js.
Environment-agnostic, ESM-friendly logger for simple needs.
Relationship graph
Dependencies (left) and dependents (right) of outvariant.
Frequently installed together
Next generation testing framework powered by Vite
Reliably determines if the code is running in Node.js
TypeScript definitions for node
An HTTP/1.1 client, written from scratch for Node.js
Promise based HTTP client for the browser and node.js
Fast, unopinionated, minimalist web framework
A JavaScript implementation of many web standards
A light-weight module that brings Fetch API to node.js
HTTP and HTTPS modules that follow redirects.
node.js realtime framework server
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.
A high-level API to automate web browsers
Release history
No releases in the last two years, typically about 2 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.4.3latest | 2 years ago | 23 KB | MIT |
| 1.4.2 | 2 years ago | 22 KB | MIT |
| 1.4.1 | 2 years ago | 22 KB | MIT |
| 1.4.0 | 3 years ago | 22 KB | MIT |
| 1.3.0 | 4 years ago | 11 KB | MIT |
| 1.2.1 | 5 years ago | 8.5 KB | MIT |
| 1.2.0 | 5 years ago | 6.5 KB | MIT |
| 1.1.0 | 5 years ago | 4.8 KB | MIT |
| 1.0.5 | 5 years ago | 5.1 KB | MIT |
| 1.0.4 | 5 years ago | 5.0 KB | MIT |
| 1.0.3 | 5 years ago | 4.1 KB | MIT |
| 1.0.2 | 5 years ago | 3.3 KB | MIT |
| 1.0.1 | 5 years ago | 1.2 KB | MIT |
| 1.0.0 | 5 years ago | 4.8 KB | MIT |
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
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.