Typed Environment Variable Parser
JSON →typed-env is a TypeScript-first library designed for parsing environment variables with strong type safety. Its current stable version is 2.0.0, which notably incorporates features from `neon-env` following a recent merge, indicating active development. This library provides mechanisms to define schemas for environment variables, ensuring that values are correctly parsed into specified types like numbers or URLs. Key differentiators include support for custom parsers, allowing complex transformations; the ability to define `choices` to restrict variable values to a predefined set of strings; and the flexibility to supply a custom `env` object instead of relying solely on `process.env`. It's particularly useful in applications requiring robust configuration management and type validation at runtime, helping prevent common configuration-related errors.
Traffic · last 30 days ↓25% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇮 Finland