Socket
Book a DemoInstallSign in
Socket

12g-cleandotenv

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

12g-cleandotenv

This package enables you to load .env files and return their values as an object.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

12g-cleandotenv

This package enables you to load .env files and return their values as an object.

It cleans out:

  • Comment lines
  • Single or double quotes from values

Usage

const dotenv = require('12g-cleandotenv')

dotenv.load()
.then(vars => {
    console.log(vars)
})

Methods

.load([path])

Loads a .env file and returns the cleaned up variables in an object, as a Promise.

.clean(input)

Cleans up the content of a .env file and returns the variables in an object. The env file content input can be a string or an object.

Keywords

env

FAQs

Package last updated on 26 May 2017

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