Skip to content

parseEnvValueAsNumber

parseEnvValueAsNumber(value): number | bigint | null

Defined in: env/parse-env-value.ts:12

Read an environment variable value as a number.

An integer beyond the safe range is returned as a bigint, so a value is never silently rounded.

string | null | undefined

The value to read.

number | bigint | null

The number or bigint it spells, or null if it spells neither.