Package @google-cloud/rcloadenv (4.0.0)
Stay organized with collections
Save and categorize content based on your preferences.
Interfaces
Functions
apply(variables, env, opts)
export declare function apply(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)
export declare function getAndApply(configName: string, env?: NodeJS.ProcessEnv, opts?: RCLoadEnvOptions): Promise
Retrieves 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)
export declare function getVariables(configName: string, opts?: RCLoadEnvOptions): Promise
Retrieves all variables in the given config.
Returns |
---|
Type | Description |
Promise<Variable[]> | {Promise}
|
export declare function transform(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: "...", ... }
Returns |
---|
Type | Description |
NodeJS.ProcessEnv | |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-30 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"lastModified": "Last updated 2024-08-30 UTC.",
"confidential": False
}