Package
ts-pattern
The exhaustive Pattern Matching library for TypeScript.
Key numbers
As of 25 Sept 2026
- Weekly downloads
- 4.5m
- +111% over 12 months
- Gzip bundle size
- -
- No Bundlephobia data
- Dependencies
- 0
- Direct, from package.json
- Last release
- 10 months ago
- v5.9.0
- GitHub stars
- 15.2k
- 172 forks
- Open issues / PRs
- 53 / 24
- Contributors
- -
- Commits, last 52 weeks
- 22
Downloads
Last week 2026-09-15 to 2026-09-21
4,539,003 downloads last week, 23,385,143 in the last month. The 12-month change of +111% compares the average of the last 4 weeks with the first 4 weeks of the series.
- Releases, last 12 months
- 196 in total
- Latest version
- 5.9.0, 26 Oct 202510 months ago
- First published
- 24 May 2020
- Last push to GitHub
- 11 Sept 202613 days before the snapshot
- Repository archived
- No
- Open issues
- 53
- Open pull requests
- 24
- Commits, last 52 weeks
- 22
- Dependents on npm
- 1,248
Major versions
- v5 first release 5.0.0, 13 Jun 2023
- v4 first release 4.0.1, 26 Mar 2022
- v3 first release 3.0.1, 14 Mar 2021
- v2 first release 2.1.0, 30 Jan 2021
- v1 first release 1.0.0, 10 Jun 2020
- v0 first release 0.0.1, 24 May 2020
Recent releases
| Version | Published |
|---|---|
| 5.9.0 | 26 Oct 2025 |
| 5.8.0 | 26 Jul 2025 |
| 5.7.1 | 18 May 2025 |
| 5.7.0 | 28 Mar 2025 |
| 5.6.2 | 21 Jan 2025 |
| 5.6.1 | 19 Jan 2025 |
| 5.6.0 | 15 Dec 2024 |
| 5.5.0 | 14 Oct 2024 |
| 5.4.0 | 25 Sept 2024 |
| 5.3.1 | 11 Aug 2024 |
| 5.3.0 | 11 Aug 2024 |
| 5.2.0 | 12 Jun 2024 |
| 5.1.2 | 23 May 2024 |
| 5.1.1 | 6 Apr 2024 |
- Module format
- ESM + CommonJSFrom package.json type, main and exports fields
- TypeScript types
- Bundled
- Node.js engine range
- Not declared
- Runtimes
- -
- Unpacked size (npm)
- 442 kB
- Dependencies (0)
- None
npm install ts-pattern- jsDelivr
https://cdn.jsdelivr.net/npm/ts-pattern@5.9.0/ - unpkg
https://unpkg.com/ts-pattern@5.9.0/ - esm.sh
https://esm.sh/ts-pattern@5.9.0
Indexability: Indexed.