17 lines
448 B
JavaScript
17 lines
448 B
JavaScript
export const ENV = {
|
|
getValue: function (key) {
|
|
return process.env[key];
|
|
},
|
|
getBoolean: function (key) {
|
|
return (this.getValue(key)?.toLowerCase?.() === 'true');
|
|
},
|
|
getNumber: function (key) {
|
|
return parseFloat(this.getValue(key));
|
|
},
|
|
getString: function (key) {
|
|
return this.getValue(key);
|
|
},
|
|
getIsSet: function (key) {
|
|
return (this.getValue(key) !== undefined);
|
|
},
|
|
}; |