nuxt-safe-runtime-config
Version:
Validate Nuxt runtime config with Standard Schema at build time
11 lines (10 loc) • 526 B
TypeScript
export interface EnvVarLike {
key: string;
value: string;
}
export type ConfigStructure = Record<string, true | Record<string, true>>;
export type TransformedConfig = Record<string, string | Record<string, unknown>>;
export declare function toCamelCase(str: string): string;
export declare function getPrefix(key: string): string | null;
export declare function buildConfigStructureFromEnvKeys(keys: string[]): ConfigStructure;
export declare function transformEnvVars(vars: readonly EnvVarLike[]): TransformedConfig;