t-comm
Version:
专业、稳定、纯粹的工具库
11 lines (10 loc) • 403 B
TypeScript
export declare function getEnvVariableMap(filepath: string): Record<string, any>;
/**
* 读取文件中环境变量的值,支持:
* - NPM_TOKEN=xxx
* - NPM_TOKEN = xxx
* @param {string} key 环境变量的key
* @param {string} filepath 保存环境变量的文件路径
* @returns {string} 环境变量的值
*/
export declare function readEnvVariable(key: string, filepath: string): string;