# gcanti/tcomb

Type checking and DDD for JavaScript

Repository: https://github.com/gcanti/tcomb
Canonical: https://ross.abutalabs.com/products/tcomb
Language: JavaScript
License: MIT
License Family: permissive
Archived: true
Last push: 2019-05-12T10:01:36+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4453, "days_push": 2670, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1879, forks 121 (observed 2026-08-28T04:05:48.512179+00:00)

## What it is
tcomb is a lightweight JavaScript library for runtime type checking of values with a concise combinator-based syntax, supporting structs, lists, enums, refinements, unions, and more. It is designed for Domain Driven Design and adding type safety to internal code, and is intended for development use (disabled in production).

## Use cases
- validate JavaScript values at runtime
- define domain models with type-checked structs
- check function argument types
- create immutable typed models for React props
- define custom refined types like Integer
- debug invalid values with descriptive type errors

## When to choose
- you need runtime type checking in plain JavaScript without a compiler
- you want lightweight (3KB) DDD-style domain models
- you're maintaining an existing codebase already using tcomb

## When to avoid
- you use TypeScript or Flow (prefer io-ts instead)
- you need type checks in production (tcomb disables itself there)
- you're starting a new project (library is in maintenance, last release 2019)

## Facets
- artifact type: library
- maturity: maintenance
- function: type-system, serialization
- domain: developer-tools, programming-languages, web-development
- platform: browser
- tags: runtime-type-checking, domain-driven-design, type-combinators, immutable-models, nodejs, javascript

## Member repositories
- gcanti/tcomb (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:48.512179+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:14:37.662379+00:00, confidence not recorded.
  - readme: https://github.com/gcanti/tcomb (fetched 2026-08-28T04:05:48.512179+00:00, sha 7e15d871b332)
  - registry_npm: https://registry.npmjs.org/tcomb (fetched 2026-08-29T10:53:31.719769+00:00, sha c1f33bc07d7c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
