16 lines · 473 B · TypeScript
RawDownload
import type { ProviderInstanceEnvironment } from "@t3tools/contracts"; export function mergeProviderInstanceEnvironment(  environment: ProviderInstanceEnvironment | undefined,  baseEnv: NodeJS.ProcessEnv = process.env,): NodeJS.ProcessEnv {  if (!environment || environment.length === 0) {    return baseEnv;  }   const next: NodeJS.ProcessEnv = { ...baseEnv };  for (const variable of environment) {    next[variable.name] = variable.value;  }  return next;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t