# ts-env-parser **Repository Path**: mirrors_jfromaniello/ts-env-parser ## Basic Information - **Project Name**: ts-env-parser - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-04-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README The idea of this module is to parse and validate settings provided by process.env into a typescript object. This module is similar to another module I built before called [xenv](https://www.npmjs.com/package/xenv) but in addition to validation it also allow me to take advantage of static typing. ## Installation ``` npm i ts-env-parser --save ``` ## Usage ```typescript import { setting, EnvironmentBase } from '../src/index'; import * as url from 'url'; class Config extends EnvironmentBase { @setting() public PORT: number = 9090; @setting({ required: true, parser: url.parse }) public URL: url.Url; @setting() public OTHER: stirng; } const config = new Config(); config.validate(); export default config; ``` ## LICENSE MIT 2018 - José F. Romaniello