Skip to content

Commit

Permalink
Merge pull request #2 from edge/feature/initial-version
Browse files Browse the repository at this point in the history
v0.1.0 (part duex)
  • Loading branch information
adamkdean authored Nov 26, 2021
2 parents f3c7069 + 3d3f4ef commit f2d9575
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions dist/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export declare class Config {
protected static getEnvArray(key: string, defaultValue: string[]): string[];
protected static getEnvBoolean(key: string, defaultValue: boolean): boolean;
protected static getEnvNumber(key: string, defaultValue: number): number;
protected static getEnvObject(key: string, defaultValue: Record<string, unknown>): Record<string, unknown>;
protected static getEnvString(key: string, defaultValue: string): string;
static getEnvArray(key: string, defaultValue: string[], delimiter?: string): string[];
static getEnvBoolean(key: string, defaultValue: boolean): boolean;
static getEnvNumber(key: string, defaultValue: number): number;
static getEnvObject(key: string, defaultValue: Record<string, unknown>): Record<string, unknown>;
static getEnvString(key: string, defaultValue: string): string;
}
5 changes: 3 additions & 2 deletions dist/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ dotenv_1["default"].config();
var Config = (function () {
function Config() {
}
Config.getEnvArray = function (key, defaultValue) {
Config.getEnvArray = function (key, defaultValue, delimiter) {
if (delimiter === void 0) { delimiter = ','; }
var value = process.env[key];
return value ? value.split(',') : defaultValue;
return value ? value.split(delimiter) : defaultValue;
};
Config.getEnvBoolean = function (key, defaultValue) {
var value = process.env[key];
Expand Down

0 comments on commit f2d9575

Please sign in to comment.