Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eddiewen/dotenvjson

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eddiewen/dotenvjson

Loads environment variables from .json file

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

dotenvjson

npm version Dependency Status Standard Version CircleCI Coverage Status

This is a module to load .json file, like config.json, and export variables to process.env. Inspired by dotenv.

Installation

$ yarn add @eddiewen/dotenvjson

# npm install --save @eddiewen/dotenvjson

Usage

Create a .env.json file in the root folder of your project.

const dotenvjson = require('@eddiewen/dotenvjson');

dotenvjson();

And you get process.env now.

Options
  • path

Default value: path.join(process.cwd(), '.env.json')

You can use a custom config file path.

  • inUpperCase

Default value: true

You don't have to use upper case in config file. Parser transforms them to upper case if this is true. Or spelling names would be kept.

Keywords

FAQs

Package last updated on 27 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc