Stone.js API
    Preparing search index...

    Function getEnum

    Get the specified env variable value as an enum.

    The environment variable key.

    Array of possible enum values or options.

    Default value if not set.

    Options for retrieving the value.

    The value as an enum.

    • Get the specified env variable value as an enum.

      Parameters

      • key: string

        The environment variable key.

      • enums: string[] | Options

        Array of possible enum values or options.

      Returns string

      The value as an enum.

    • Get the specified env variable value as an enum.

      Parameters

      • key: string

        The environment variable key.

      • enums: string[] | Options

        Array of possible enum values or options.

      • defaultValue: string

        Default value if not set.

      • Optionaloptions: Options

        Options for retrieving the value.

      Returns string

      The value as an enum.