Package
ts-invariant
TypeScript implementation of invariant(condition, message)
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
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
- v0 first release 0.1.0, 7 Feb 2019
Recent releases
| Version | Published |
|---|---|
| 0.10.3 | 13 May 2022 |
| 0.10.2 | 4 May 2022 |
| 0.10.1 | 4 Feb 2022 |
| 0.10.0 | 4 Feb 2022 |
| 0.9.4 | 7 Dec 2021 |
| 0.9.3 | 9 Sept 2021 |
| 0.9.2 | 9 Sept 2021 |
| 0.9.1 | 3 Aug 2021 |
| 0.9.0 | 12 Jul 2021 |
| 0.8.2 | 16 Jun 2021 |
| 0.8.1 | 16 Jun 2021 |
| 0.8.0 | 16 Jun 2021 |
| 0.7.5 | 16 Jun 2021 |
| 0.7.4 | 16 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- jsDelivr
https://cdn.jsdelivr.net/npm/ts-invariant@0.10.3/ - unpkg
https://unpkg.com/ts-invariant@0.10.3/ - esm.sh
https://esm.sh/ts-invariant@0.10.3
Indexability: Indexed.