{"adoption": {"forks": 171, "observed_at": "2026-08-28T04:11:09.263664+00:00", "stars": 15137}, "canonical_url": "https://ross.abutalabs.com/products/ts-pattern", "card": {"archived": false, "artifact_type": "library", "description": "🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference.", "domain": ["programming-languages", "developer-tools", "frontend", "web-development"], "enriched": true, "function": ["type-system", "developer-tools"], "health_score": 93, "homepage": null, "language": "TypeScript", "license": "MIT", "license_family": "permissive", "maturity": "stable", "member_repos": ["gvergnaud/ts-pattern"], "name": "gvergnaud/ts-pattern", "platform": ["browser"], "pushed_at": "2026-08-10T23:33:38+00:00", "repo": "gvergnaud/ts-pattern", "stars": 15137, "tags": ["pattern-matching", "type-inference", "exhaustiveness-checking", "adt", "typescript-library", "nodejs", "typescript", "javascript"], "topics": ["pattern-matching", "typescript", "ts", "pattern", "matching", "inference", "type-inference", "exhaustive", "conditions", "branching", "javascript"], "urls": [], "use_cases": ["match on discriminated unions in typescript", "exhaustive switch handling for adts", "validate data shape with type-safe patterns", "replace nested if-else conditions with readable matching", "extract nested values from objects and arrays with patterns"], "what_it_is": "TS-Pattern is an exhaustive pattern matching library for TypeScript with smart type inference. It lets developers express complex branching conditions in a compact, typesafe way with compile-time exhaustiveness checking.", "when_to_avoid": ["you work in plain javascript without type checking", "you only need simple switch statements with few cases", "you need runtime schema validation with detailed error messages"], "when_to_choose": ["you write typescript and want compile-time exhaustiveness checking over unions", "you want a tiny (~2kB) dependency-free branching utility", "you need type-safe data validation and selection in one expression"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/ts-pattern", "repo": "gvergnaud/ts-pattern", "role": "main", "score": 78}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-29T17:06:36.304645+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "9b43221aaae1fdc06f9a546b18c5e8cc8e3f14896735c78803fed4168c70aa2c", "fetched_at": "2026-08-28T04:11:09.263664+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gvergnaud/ts-pattern"}, {"content_hash": "ff73a7bc8b8d1d1b9bb317ac6e54a3dfbef77e7f8fb32d2d015826eca02f7196", "fetched_at": "2026-08-29T08:04:45.561057+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/ts-pattern"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-29T17:06:36.304645+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "9b43221aaae1fdc06f9a546b18c5e8cc8e3f14896735c78803fed4168c70aa2c", "fetched_at": "2026-08-28T04:11:09.263664+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gvergnaud/ts-pattern"}, {"content_hash": "ff73a7bc8b8d1d1b9bb317ac6e54a3dfbef77e7f8fb32d2d015826eca02f7196", "fetched_at": "2026-08-29T08:04:45.561057+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/ts-pattern"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-29T17:06:36.304645+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "9b43221aaae1fdc06f9a546b18c5e8cc8e3f14896735c78803fed4168c70aa2c", "fetched_at": "2026-08-28T04:11:09.263664+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gvergnaud/ts-pattern"}, {"content_hash": "ff73a7bc8b8d1d1b9bb317ac6e54a3dfbef77e7f8fb32d2d015826eca02f7196", "fetched_at": "2026-08-29T08:04:45.561057+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/ts-pattern"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-29T17:06:36.304645+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "9b43221aaae1fdc06f9a546b18c5e8cc8e3f14896735c78803fed4168c70aa2c", "fetched_at": "2026-08-28T04:11:09.263664+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gvergnaud/ts-pattern"}, {"content_hash": "ff73a7bc8b8d1d1b9bb317ac6e54a3dfbef77e7f8fb32d2d015826eca02f7196", "fetched_at": "2026-08-29T08:04:45.561057+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/ts-pattern"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-29T17:06:36.304645+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "9b43221aaae1fdc06f9a546b18c5e8cc8e3f14896735c78803fed4168c70aa2c", "fetched_at": "2026-08-28T04:11:09.263664+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gvergnaud/ts-pattern"}, {"content_hash": "ff73a7bc8b8d1d1b9bb317ac6e54a3dfbef77e7f8fb32d2d015826eca02f7196", "fetched_at": "2026-08-29T08:04:45.561057+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/ts-pattern"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-29T17:06:36.304645+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "9b43221aaae1fdc06f9a546b18c5e8cc8e3f14896735c78803fed4168c70aa2c", "fetched_at": "2026-08-28T04:11:09.263664+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gvergnaud/ts-pattern"}, {"content_hash": "ff73a7bc8b8d1d1b9bb317ac6e54a3dfbef77e7f8fb32d2d015826eca02f7196", "fetched_at": "2026-08-29T08:04:45.561057+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/ts-pattern"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:11:09.263664+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-29T17:06:36.304645+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "9b43221aaae1fdc06f9a546b18c5e8cc8e3f14896735c78803fed4168c70aa2c", "fetched_at": "2026-08-28T04:11:09.263664+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gvergnaud/ts-pattern"}, {"content_hash": "ff73a7bc8b8d1d1b9bb317ac6e54a3dfbef77e7f8fb32d2d015826eca02f7196", "fetched_at": "2026-08-29T08:04:45.561057+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/ts-pattern"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-29T17:06:36.304645+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "9b43221aaae1fdc06f9a546b18c5e8cc8e3f14896735c78803fed4168c70aa2c", "fetched_at": "2026-08-28T04:11:09.263664+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gvergnaud/ts-pattern"}, {"content_hash": "ff73a7bc8b8d1d1b9bb317ac6e54a3dfbef77e7f8fb32d2d015826eca02f7196", "fetched_at": "2026-08-29T08:04:45.561057+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/ts-pattern"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-29T17:06:36.304645+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "9b43221aaae1fdc06f9a546b18c5e8cc8e3f14896735c78803fed4168c70aa2c", "fetched_at": "2026-08-28T04:11:09.263664+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gvergnaud/ts-pattern"}, {"content_hash": "ff73a7bc8b8d1d1b9bb317ac6e54a3dfbef77e7f8fb32d2d015826eca02f7196", "fetched_at": "2026-08-29T08:04:45.561057+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/ts-pattern"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-29T17:06:36.304645+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "9b43221aaae1fdc06f9a546b18c5e8cc8e3f14896735c78803fed4168c70aa2c", "fetched_at": "2026-08-28T04:11:09.263664+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gvergnaud/ts-pattern"}, {"content_hash": "ff73a7bc8b8d1d1b9bb317ac6e54a3dfbef77e7f8fb32d2d015826eca02f7196", "fetched_at": "2026-08-29T08:04:45.561057+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/ts-pattern"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 97, "longevity": 100, "rhythm": 42}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 2292, "days_push": 23, "days_rel": 311, "gap_med": 56.0, "n_releases_24m": 9}, "score": 78, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}