Package @google-cloud/rcloadenv (4.0.0) Stay organized with collections Save and categorize content based on your preferences.
Interfaces
RCLoadEnvOptions
TransformOptions
Variable
Functions
apply(variables, env, opts)
exportdeclarefunctionapply(variables:Variable[],env?:NodeJS.ProcessEnv,opts?:{}):NodeJS.ProcessEnv;Applies the provided raw variables to the given object.
| Parameters | |
|---|---|
| Name | Description |
variables | Variable[] |
env | NodeJS.ProcessEnv |
opts | {} |
| Returns | |
|---|---|
| Type | Description |
NodeJS.ProcessEnv | |
getAndApply(configName, env, opts)
exportdeclarefunctiongetAndApply(configName:string,env?:NodeJS.ProcessEnv,opts?:RCLoadEnvOptions):PromiseRetrieves all variables in the given config and mixes them into the given object.
| Parameters | |
|---|---|
| Name | Description |
configName | string |
env | NodeJS.ProcessEnv |
opts | RCLoadEnvOptions |
| Returns | |
|---|---|
| Type | Description |
Promise<"\"process\"".__global.NodeJS.ProcessEnv> | {Promise} |
getVariables(configName, opts)
exportdeclarefunctiongetVariables(configName:string,opts?:RCLoadEnvOptions):PromiseRetrieves all variables in the given config.
| Parameters | |
|---|---|
| Name | Description |
configName | string |
opts | RCLoadEnvOptions |
| Returns | |
|---|---|
| Type | Description |
Promise<Variable[]> | {Promise} |
transform(variables, oldEnv, opts)
exportdeclarefunctiontransform(variables:Variable[],oldEnv?:NodeJS.ProcessEnv,opts?:TransformOptions):NodeJS.ProcessEnv;Transforms the given array of raw variables into a simple key-value object.
In: [{name:"...",value:"..."}, ...] Out: { VAR1: "...", VAR2: "...", ... }
| Parameters | |
|---|---|
| Name | Description |
variables | Variable[] |
oldEnv | NodeJS.ProcessEnv |
opts | TransformOptions |
| Returns | |
|---|---|
| Type | Description |
NodeJS.ProcessEnv | |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.