New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dotenv-vars

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv-vars - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

index.js

@@ -9,6 +9,6 @@ var fs = require('fs'),

envArray.forEach(function(envKeyVal) {
var key = envKeyVal.split('=')[0],
val = envKeyVal.split('=')[1];
var key = envKeyVal.split('=')[0].trim(),
val = envKeyVal.split('=')[1].trim();
process.env[key] = val;
}, this);
{
"name": "dotenv-vars",
"version": "1.0.1",
"version": "1.0.2",
"description": "The slimmest module to load a .env file in your project path, setting each row in environment variables.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -11,2 +11,18 @@ dotenv-loader

- Put a **.env** file in your project root containing one pair of environment variable on each row like ``` NODE_ENV=debug ```
- In the top of your main file put ``` require('dotenv-vars') ```
- In the top of your main file put ``` require('dotenv-vars') ```
## Example
### .env
```
NODE_ENV=debug
PORT=3000
```
### index.js
```javascript
require('dotenv-vars');
console.log('process.env.PORT');
```
Prints: ```3000```
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