UNPKG

813 BJavaScriptView Raw
1export const environmentKeys = {
2 CSPELL_ENABLE_DICTIONARY_LOGGING: 'CSPELL_ENABLE_DICTIONARY_LOGGING',
3 CSPELL_ENABLE_DICTIONARY_LOG_FILE: 'CSPELL_ENABLE_DICTIONARY_LOG_FILE',
4 CSPELL_ENABLE_DICTIONARY_LOG_FIELDS: 'CSPELL_ENABLE_DICTIONARY_LOG_FIELDS',
5 CSPELL_GLOB_ROOT: 'CSPELL_GLOB_ROOT',
6};
7export function getEnvironmentVariables() {
8 return process.env;
9}
10export function setEnvironmentVariable(key, value) {
11 process.env[key] = value;
12}
13export function getEnvironmentVariable(key) {
14 return process.env[key];
15}
16export function truthy(value) {
17 switch (value?.toLowerCase().trim()) {
18 case 't':
19 case 'true':
20 case 'on':
21 case 'yes':
22 case '1': {
23 return true;
24 }
25 }
26 return false;
27}
28//# sourceMappingURL=environment.js.map
\No newline at end of file