11 lines
1.6 KiB
JavaScript
11 lines
1.6 KiB
JavaScript
|
"use strict";
|
||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
function getEnvironmentVariableName(source) {
|
||
|
const names = Object.keys(process.env);
|
||
|
return names.find(name => name === source) || names.find(name => name.toLowerCase() === source.toLowerCase());
|
||
|
}
|
||
|
function default_1(name) {
|
||
|
return process.env[getEnvironmentVariableName(name)];
|
||
|
}
|
||
|
exports.default = default_1;
|
||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWVudmlyb25tZW50LXZhcmlhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3V0aWxzL2dldC1lbnZpcm9ubWVudC12YXJpYWJsZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLFNBQVMsMEJBQTBCLENBQUUsTUFBTTtJQUN2QyxNQUFNLEtBQUssR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUV2QyxPQUFPLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxJQUFJLEtBQUssTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsS0FBSyxNQUFNLENBQUMsV0FBVyxFQUFFLENBQUMsQ0FBQztBQUNsSCxDQUFDO0FBRUQsbUJBQXlCLElBQUk7SUFDekIsT0FBTyxPQUFPLENBQUMsR0FBRyxDQUFDLDBCQUEwQixDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7QUFDekQsQ0FBQztBQUZELDRCQUVDIiwic291cmNlc0NvbnRlbnQiOlsiZnVuY3Rpb24gZ2V0RW52aXJvbm1lbnRWYXJpYWJsZU5hbWUgKHNvdXJjZSkge1xuICA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