Socket
Socket
Sign inDemoInstall

12g-cleandotenv

Package Overview
Dependencies
7
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
14
increased by7.69%
Maintainers
1
Install size
387 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 26 May 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc