• Read environment variables (process.env) and return an object with the values sanitized and the keys formatted

    Type Parameters

    • T extends Record<string, any> = Record<string, any>

    Returns T

  • Read environment variables (process.env), filter them based in the indicated prefix, and return an object with the values sanitized and the keys formatted

    Type Parameters

    • T extends Record<string, any> = Record<string, any>

    Parameters

    • prefix: string

      prefix to filter

    Returns T

  • Read environment variables (process.env), filter them based in the indicated prefix, and return an object with the values sanitized and the keys formatted based on the specified options

    Type Parameters

    • T extends Record<string, any> = Record<string, any>

    Parameters

    • prefix: string

      prefix to filter

    • options: Partial<ReadEnvOptions>

      options to be used for key/value parsing and sanitize

    Returns T

  • Process a source, encoded as a environment variables file, filter them based in the indicated prefix, and return an object with the values sanitized and the keys formatted based on the specified options

    Type Parameters

    • T extends Record<string, any> = Record<string, any>

    Parameters

    • prefix: string

      prefix to filter

    • options: Partial<ReadEnvOptions>

      options to be used for key/value parsing and sanitize

    • source: Record<string, undefined | string>

      source to be processed

    Returns T