diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-06-21 23:00:56 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-06-21 23:00:56 +0800 |
commit | 3f5c388e8bc41b1b6d219743b125ef541efeed96 (patch) | |
tree | b16853c32d2dabfc1af7b1fb04dd019c69e8d680 /deno/base/config.ts | |
parent | 888650202daeed5c5b423013df9a629d36c3d007 (diff) | |
download | crupest-3f5c388e8bc41b1b6d219743b125ef541efeed96.tar.gz crupest-3f5c388e8bc41b1b6d219743b125ef541efeed96.tar.bz2 crupest-3f5c388e8bc41b1b6d219743b125ef541efeed96.zip |
mail: organize utils in namespace-like object. no logging cause.
Diffstat (limited to 'deno/base/config.ts')
-rw-r--r-- | deno/base/config.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/deno/base/config.ts b/deno/base/config.ts index a5f5d86..96cc869 100644 --- a/deno/base/config.ts +++ b/deno/base/config.ts @@ -1,4 +1,4 @@ -import { camelCaseToKebabCase } from "./lib.ts"; +import { StringUtils } from "./lib.ts"; export interface ConfigDefinitionItem { readonly description: string; @@ -29,7 +29,9 @@ export class ConfigProvider<K extends string> { for (const [key, def] of Object.entries(definition as ConfigDefinition)) { map[key] = { ...def, - env: `${this.#prefix}-${camelCaseToKebabCase(key as string)}` + env: `${this.#prefix}-${ + StringUtils.camelCaseToKebabCase(key as string) + }` .replaceAll("-", "_") .toUpperCase(), }; |