dotenv-expand

  • Version 11.0.6
  • Published
  • 18.2 kB
  • 1 dependency
  • BSD-2-Clause license

Install

npm i dotenv-expand
yarn add dotenv-expand
pnpm add dotenv-expand

Overview

Expand environment variables using dotenv

Index

Functions

function expand

expand: (options?: DotenvExpandOptions) => DotenvExpandOutput;
  • Adds variable expansion on top of dotenv.

    See https://docs.dotenv.org

    Parameter options

    additional options. example: { processEnv: {}, error: null, parsed: { { KEY: 'value' } }

    Returns

    an object with a parsed key if successful or error key if an error occurred. example: { parsed: { KEY: 'value' } }

Interfaces

interface DotenvExpandOptions

interface DotenvExpandOptions {}

    property error

    error?: Error;

      property parsed

      parsed?: DotenvParseInput;
      • Default: object

        Object coming from dotenv's parsed result.

      property processEnv

      processEnv?: DotenvPopulateInput;
      • Default: process.env

        Specify an object to write your secrets to. Defaults to process.env environment variables.

        example: const processEnv = {}; require('dotenv').config({ processEnv: processEnv })

      interface DotenvExpandOutput

      interface DotenvExpandOutput {}

        property error

        error?: Error;

          property parsed

          parsed?: DotenvParseOutput;

            interface DotenvParseInput

            interface DotenvParseInput {}

              index signature

              [name: string]: string;

                interface DotenvParseOutput

                interface DotenvParseOutput {}

                  index signature

                  [name: string]: string;

                    interface DotenvPopulateInput

                    interface DotenvPopulateInput {}

                      index signature

                      [name: string]: string;

                        Package Files (1)

                        Dependencies (1)

                        Dev Dependencies (5)

                        Peer Dependencies (0)

                        No peer dependencies.

                        Badge

                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/dotenv-expand.

                        • Markdown
                          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/dotenv-expand)
                        • HTML
                          <a href="https://www.jsdocs.io/package/dotenv-expand"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>