Module process

Index

Functions

Functions

getEnv(name: string, opt_default?: string): string

Queries for a named environment variable.

Parameters

  • name: string

    The name of the environment variable to look up.

  • opt_default?: string optional

    The default value if the named variable is not defined.

Returns

string

The queried environment variable.

isNative(): boolean

Returns

boolean

Whether the current process is Node's native process object.

setEnv(name: string, value: any)

Sets an environment value. If the new value is either null or undefined, the environment variable will be cleared.

Parameters

  • name: string

    The value to set.

  • value: any

    The new value; will be coerced to a string.