* Automaticly fixable eslint issues, mostly 3 -> 2 space indentation * fix: updated plex_userid to camelcase * Linted and some consistency refactor on middleware * eslint uses ecmaversion 2020 & allow empty catch rule * Started linting source files * Fixed eslint errors & improved a lot of error handling * Set 2 eslint rules as warning temporarly
16 lines
277 B
JavaScript
16 lines
277 B
JavaScript
class EnvironmentVariables {
|
|
constructor(variables) {
|
|
this.variables = variables || process.env;
|
|
}
|
|
|
|
get(variable) {
|
|
return this.variables[variable];
|
|
}
|
|
|
|
has(variable) {
|
|
return this.get(variable) !== undefined;
|
|
}
|
|
}
|
|
|
|
module.exports = EnvironmentVariables;
|