evsecrets
Version:
Detect environment variable secrets in your codebase before you push your code to GitHub.
25 lines (24 loc) • 719 B
TypeScript
/**
* This class is used to read and process a ".env" file if it exists
* in your project. A .env file can be used in some programming
* ecosystems as an alternative location for environment variables,
* including secrets.
*
* See https://pypi.org/project/python-dotenv/
* See https://www.npmjs.com/package/dotenv
*
* Chris Joakim, 2025
*/
import { FileUtil } from "./FileUtil";
export declare class DotEnvReader {
static FILENAME: string;
exists: boolean;
envVars: Object;
names: Array<string>;
constructor();
/**
* Parse the .env file into its names and values, and populate the
* this.envVars object with them.
*/
parseFile(fu: FileUtil, infile: string): void;
}