Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EnvironmentUtils

Hierarchy

  • EnvironmentUtils

Index

Constructors

Methods

  • getPlatform(): Platform
  • mergeProcessEnv(env?: Record<string, null | string>): Record<string, string>
  • Merge a given record of environment variables with the process environment variables. Empty string values will not be included in the final env.

    Parameters

    • env: Record<string, null | string> = {}

      desired environment to merge with process.env.

    Returns Record<string, string>

    a normalized merged record of valid environment variables.

  • normalizeEnv<T>(env: Record<string, T>): Record<string, T>
  • Normalize an environment record for a given OS.

    On Windows it will uppercase all keys.

    Type Parameters

    • T

    Parameters

    • env: Record<string, T>

      Environment variables map to normalize.

    Returns Record<string, T>

    New object with normalized environment variables.