﻿# get

> Resolve values synchronously without mutating the environment

[Node.js](/docs/sdk/nodejs/)

```javascript
dotenvx.get(key, options)
```

## Usage

Resolve values synchronously without changing the environment. get(key, options) returns a string or undefined. With no key, get(undefined, options) returns a resolved object. File and custody lookups block. Fatal or strict loading errors throw synchronously; nonfatal diagnostics are reported while remaining values can still be returned. get does not return a Promise.

```javascript
const dotenvx = require('@dotenvx/dotenvx')
const value = dotenvx.get('HELLO')
const values = dotenvx.get()
```

Accepts the [config options](/docs/sdk/nodejs/config/), plus all and format.

## Options

- [get all](/docs/sdk/nodejs/get-all/)
- [get format](/docs/sdk/nodejs/get-format/)
