{"library":"tcomb","type":"library","category":null,"description":"tcomb is a JavaScript library for runtime type checking and Domain-Driven Design (DDD), suitable for both Node.js and browser environments. It provides a concise syntax for defining and validating data structures, enhancing code safety during development. The current stable version is 3.2.29, with a recent cadence focused on bug fixes and TypeScript definition improvements. A key differentiator is its lightweight nature (3KB gzipped, no dependencies) and its foundation in set theory for type definition. It supports various type combinators (structs, lists, enums, refinements, unions), immutability helpers compatible with Facebook's Immutability Helpers, and runtime type introspection. Crucially, tcomb is designed to be *disabled in production* (its checks are stripped out for performance), with `io-ts` or `tcomb-validation` recommended for production-grade type validation.","language":"javascript","status":"active","version":"3.2.29","tags":["javascript","type","combinators","checking","safety","model","domain","debugging","immutable","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install tcomb","imports":["import t from 'tcomb';","import t from 'tcomb';\n// Or for type inference:\ntype MyStructType = t.TypeOf<typeof MyStructDefinition>;","import t from 'tcomb';\nconst MyType = t.struct({ /* ... */ });"]},{"cmd":"yarn add tcomb","imports":[]},{"cmd":"pnpm add tcomb","imports":[]}],"homepage":null,"github":"https://github.com/gcanti/tcomb","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/tcomb","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/tcomb/compatibility"}}