fixed a lot of lint and work on utils
This commit is contained in:
parent
4881a38c32
commit
42bc2966df
17 changed files with 183 additions and 93 deletions
|
|
@ -110,16 +110,16 @@ export class EnvLoader implements ConfigLoader {
|
|||
}
|
||||
|
||||
// Handle booleans
|
||||
if (value.toLowerCase() === 'true') return true;
|
||||
if (value.toLowerCase() === 'false') return false;
|
||||
if (value.toLowerCase() === 'true') {return true;}
|
||||
if (value.toLowerCase() === 'false') {return false;}
|
||||
|
||||
// Handle numbers
|
||||
const num = Number(value);
|
||||
if (!isNaN(num) && value !== '') return num;
|
||||
if (!isNaN(num) && value !== '') {return num;}
|
||||
|
||||
// Handle null/undefined
|
||||
if (value.toLowerCase() === 'null') return null;
|
||||
if (value.toLowerCase() === 'undefined') return undefined;
|
||||
if (value.toLowerCase() === 'null') {return null;}
|
||||
if (value.toLowerCase() === 'undefined') {return undefined;}
|
||||
|
||||
// Return as string
|
||||
return value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue