Skip to main content

Env

import { RootApiEnvSchema, checkEnv, getENV } from '@rtorcato/js-common/env'

Exports

NameSummary
RootApiEnvSchemaSchema for validating the root environment variables.
checkEnvValidates the environment variables against a Zod schema.
getENVRetrieves the value of an environment variable by its key.
getNodeEnvReturns the current NODE_ENV value, or 'development' if not set.
isDevDetermines if the current environment is set to development.
isProdDetermines if the current environment is set to production.
isTestDetermines if the current environment is set to test.