• Coerce an environment variable

    Parameters

    • env: undefined | string

      Environment

    Returns Coercible

  • Coerce an environment variable to a boolean value

    Parameters

    • env: undefined | string

      Environment

    • alternative: boolean

      default value

    Returns boolean

  • Coerce an environment variable to a numerical value

    Parameters

    • env: undefined | string

      Environment

    • alternative: number

      default value

    Returns number

  • Coerce an environment variable to an object

    Parameters

    • env: undefined | string

      Environment

    • alternative: Record<string, any>

      default value

    Returns Record<string, any>

  • Coerce an environment variable to an array

    Parameters

    • env: undefined | string

      Environment

    • alternative: any[]

      default value

    Returns any[]

  • Coerce an environment variable to a valid value

    Type Parameters

    Parameters

    • env: undefined | string

      Environment

    Returns T | undefined

  • Coerce an environment variable to a valid value

    Parameters

    • env: undefined | string

      Environment

    • alternative: any

      default value

    Returns any