wj-config
Version:
Javascript configuration module for NodeJS and browser frameworks such as React that works like ASP.net configuration where data sources are specified (usually JSON files) and environment variables can contribute/overwrite values by following a naming con
16 lines (15 loc) • 505 B
JavaScript
/**
* Error class used to raise an error whenever an environment object is being created with an environment value that
* does not exist in the list of known environment names.
*/
export class InvalidEnvNameError extends Error {
/**
* Environment value that caused the error.
*/
value;
constructor(value, message) {
super(message ?? `The provided environment value "${value}" was not found among the provided list of environments.`);
this.value = value;
}
}
;