Hyperlinkv0.8.0-beta.28

String

String.configCaseconsteffect/String.ts:1402
(self: string): string

Converts a string to CONFIG_CASE (uppercase with underscores) for configuration keys.

When to use

Use to normalize configuration path segments into environment-variable-like keys while preserving numeric word groups such as v2.

Details

Unlike constantCase, digit-letter boundaries are not split. For example, "api-v2 xml" becomes "API_V2_XML".

transformingconstantCase
Source effect/String.ts:14022 lines
export const configCase: (self: string) => string = (self) =>
  normalizeCase(self, CONFIG_SPLIT_REGEXP, STRIP_REGEXP, "_", toUpperCase)
Referenced by 1 symbols