Type System & Enum Utilities
Type-safe enums with ordinals, display names, custom values, and pattern matching; strongly-typed value objects with built-in validation; runtime type guards and inference; safe parsers that coerce strings into booleans / numbers / dates / enums without throwing. The "make the type system carry more weight at runtime" layer so business code can stop asserting on raw strings.
Projects
Packages (21)
- @philiprehberger/dotnet-enum-toolkitdotnet
Enum utilities — parse with fallback, get display names and descriptions, convert to dictionaries, and list values.
- @philiprehberger/dotnet-mapperdotnet
Ultra-simple object-to-object mapper with convention-based mapping and fluent overrides.
- @philiprehberger/dotnet-specificationdotnet
Specification pattern implementation for composable, reusable query filters.
- @philiprehberger/dotnet-value-ofdotnet
Strongly-typed value objects with built-in validation and JSON support — eliminate primitive obsession.
- @philiprehberger/go-typeconvgo
Safe type conversion utilities for Go. Handle `interface{}` values from JSON, configs, and APIs
- @philiprehberger/kt-enum-kitkotlin
Enhanced enum utilities: safe parsing, display names, and value mapping.
- @philiprehberger/php-dto-mapperphp
Map arrays and JSON to strongly-typed DTOs with attribute-driven configuration
- @philiprehberger/php-enum-utilsphp
Utility trait and helpers for PHP 8.1+ native enums
- @philiprehberger/py-enum-toolspython
Practical utilities for Python enums — lookup, validation, listing, and serialization
- @philiprehberger/py-schema-inferpython
Infer JSON schemas from sample data
- @philiprehberger/py-type-parsepython
Parse strings into Python types intelligently — booleans, numbers, dates, None, lists
- @philiprehberger/rb-approxruby
Epsilon-based approximate equality for floats, arrays, and hashes
- @philiprehberger/rb-data-mapperruby
Data transformation DSL for mapping hashes and CSV rows
- @philiprehberger/rb-enumruby
Type-safe enumerations with ordinals, custom values, and pattern matching
- @philiprehberger/invariant-tstypescript
Tiny runtime assertion with TypeScript narrowing
- @philiprehberger/match-tstypescript
Pattern matching for TypeScript — switch on steroids
- @philiprehberger/micro-schematypescript
Lightweight schema validation library with Zod-like API in under 3KB
- @philiprehberger/predicate-tstypescript
Composable predicate builders for filtering and validation
- @philiprehberger/ts-enumtypescript
Rich enums with methods labels and serialization
- @philiprehberger/ts-type-checktypescript
Runtime type checking utilities with TypeScript type guards — typeof on steroids
- @philiprehberger/zod-defaultstypescript
Auto-generate default values, empty form states, and mock data from Zod schemas