• Retrieves a list of strings from an environment variable.

    • Uses ',' as the delimiter.
    • Trims leading and trailing whitespace from each entry.
    • Excludes empty entries.
    • Returns undefined if the environment variable is empty or contains only whitespace.
    • Returns an empty array if all entries are empty or whitespace.

    Parameters

    • key: string

      The name of the environment variable to retrieve.

    Returns undefined | string[]

    • The list of strings or undefined.