Skip to content

holocronEnv

holocronEnv(source?): EnvLookup

Defined in: holocron-env.ts:22

An EnvLookup for a variable Holocron owns: get("AXIOM_DATASET") tries HOLOCRON_AXIOM_DATASET and then the bare AXIOM_DATASET, which is kept as a fallback. source is the environment to read (the process environment when omitted, as in createEnvLookup).

Do not use it for a name a third party reads itself (GITHUB_TOKEN, CI, NO_UPDATE_NOTIFIER): there the bare name is the contract and the prefixed one would be an extra spelling nothing else knows.

Record<string, string | undefined>

EnvLookup

const dataset = holocronEnv().get("AXIOM_DATASET"); // HOLOCRON_AXIOM_DATASET, else AXIOM_DATASET