firstEnv
Call Signature
Section titled “Call Signature”firstEnv(
env,names,fallback):string
Defined in: first-env.ts:11
Return the value of the first variable in names that is set and
non-empty, or fallback when none is. Use it for a precedence chain such
as a product-specific name, then the vendor-native name, then a default.
Parameters
Section titled “Parameters”readonly string[]
fallback
Section titled “fallback”string
Returns
Section titled “Returns”string
Example
Section titled “Example”const dsn = firstEnv(env, ["HOLOCRON_SENTRY_DSN", "SENTRY_DSN"], DEFAULT_DSN);Call Signature
Section titled “Call Signature”firstEnv(
env,names,fallback?):string|undefined
Defined in: first-env.ts:12
Return the value of the first variable in names that is set and
non-empty, or fallback when none is. Use it for a precedence chain such
as a product-specific name, then the vendor-native name, then a default.
Parameters
Section titled “Parameters”readonly string[]
fallback?
Section titled “fallback?”string
Returns
Section titled “Returns”string | undefined
Example
Section titled “Example”const dsn = firstEnv(env, ["HOLOCRON_SENTRY_DSN", "SENTRY_DSN"], DEFAULT_DSN);