Home Reference Source Test Repository

Function

Static Public Summary
public

Replace the value of the command line arguments in process.env, and run the process with a replaced arguments.

public

Select the key of the value to be replaced from "process.env".

public

Replace the arguments in the value of "process.env".

Static Public

public CrossConfEnv(argv: Array<Object>): Object source

import CrossConfEnv from 'cross-conf-env/src/lib/cross-conf-env.js'

Replace the value of the command line arguments in process.env, and run the process with a replaced arguments.

Params:

NameTypeAttributeDescription
argv Array<Object>

Arguments of the command line.

Return:

Object

Process.

Test:

public FilterKeys(): Array<String> source

import {FilterKeys} from 'cross-conf-env/src/lib/cross-conf-env.js'

Select the key of the value to be replaced from "process.env".

Return:

Array<String>

Keys.

Test:

public ReplaceArgv(argv: Array<Object>, keys: Array<Object>): Array<String> source

import {ReplaceArgv} from 'cross-conf-env/src/lib/cross-conf-env.js'

Replace the arguments in the value of "process.env".

Params:

NameTypeAttributeDescription
argv Array<Object>

Arguments of the command line.

keys Array<Object>

The filtered key ( "npmpackage" or "npmconfig" ) of "process.env".

Return:

Array<String>

Augments.

Test: