UNPKG

envsaurus

Version:

ENVSAURUS is a zero-dependency CLI + library that turns your .env.example into a fully typed config file. It validates environment variables at runtime, fails fast in CI, and exports a safe CONFIG object for Node/TypeScript apps. Catch missing or invalid

13 lines (12 loc) 420 B
export type EnvType = 'string' | 'number' | 'boolean' | 'enum' | 'url' | 'email' | 'json'; export interface SchemaEntry { key: string; type: EnvType; enumValues?: string[]; defaultValue?: string; } export interface EnvSchema { entries: SchemaEntry[]; } export declare function parseExampleContent(content: string): EnvSchema; export declare function parseExampleFile(examplePath: string): EnvSchema;