@karmaniverous/get-dotenv
    Preparing search index...

    Function dotenvExpandAll

    • Recursively expands environment variables in the values of a JSON object. Variables may be presented with optional default as $VAR[:default] or ${VAR[:default]}. Unknown variables will expand to an empty string.

      Parameters

      • values: ProcessEnv = {}

        The values object to expand.

      • options: { progressive?: boolean; ref?: ProcessEnv } = {}

        Expansion options.

      Returns Record<string, undefined | string>

      The value object with expanded string values.

      process.env.FOO = 'bar';
      dotenvExpandAll({ A: '$FOO', B: 'x${FOO}y' });
      // => { A: "bar", B: "xbary" }

      Options:

      • ref: The reference object to use for expansion (defaults to process.env).
      • progressive: Whether to progressively add expanded values to the set of reference keys.

      When progressive is true, each expanded key becomes available for subsequent expansions in the same object (left-to-right by object key order).