Skip to content
JS
Package

ts-invariant

TypeScript implementation of invariant(condition, message)

v0.10.3, 13 May 2022MITESM + CommonJSTypes: BundledTypeScript tooling
$ npm install ts-invariant

Key numbers

As of 25 Sept 2026
Weekly downloads
4.6m
+7% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
1
Direct, from package.json
Last release
4 years ago
v0.10.3
GitHub stars
94
16 forks
Open issues / PRs
6 / 6
Contributors
-
Commits, last 52 weeks
0

Downloads

Last week 2026-09-15 to 2026-09-21
02m4m6m8mSept 2025Mar 2026Sept 2026High 7.8m (23 Jun 2026)Low 2.1m (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

4,581,064 downloads last week, 23,488,561 in the last month. The 12-month change of +7% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
036 in total
Latest version
0.10.3, 13 May 20224 years ago
First published
7 Feb 2019
Last push to GitHub
26 Jan 2024972 days before the snapshot
Repository archived
No
Open issues
6
Open pull requests
6
Commits, last 52 weeks
0
Dependents on npm
244

Major versions

  1. v0 first release 0.1.0, 7 Feb 2019

Recent releases

VersionPublished
0.10.313 May 2022
0.10.24 May 2022
0.10.14 Feb 2022
0.10.04 Feb 2022
0.9.47 Dec 2021
0.9.39 Sept 2021
0.9.29 Sept 2021
0.9.13 Aug 2021
0.9.012 Jul 2021
0.8.216 Jun 2021
0.8.116 Jun 2021
0.8.016 Jun 2021
0.7.516 Jun 2021
0.7.416 Jun 2021
Module format
ESM + CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
>=8
Runtimes
-
Unpacked size (npm)
28 kB
Dependencies (1)
tslib
npm install ts-invariant
  • jsDelivrhttps://cdn.jsdelivr.net/npm/ts-invariant@0.10.3/
  • unpkghttps://unpkg.com/ts-invariant@0.10.3/
  • esm.shhttps://esm.sh/ts-invariant@0.10.3
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.