Socket
Socket
Sign inDemoInstall

dotenv

Package Overview
Dependencies
Maintainers
4
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv - npm Package Compare versions

Comparing version 5.0.1 to 6.0.0

lib/cli-options.js

12

config.js
(function () {
var options = {}
process.argv.forEach(function (val, idx, arr) {
var matches = val.match(/^dotenv_config_(.+)=(.+)/)
if (matches) {
options[matches[1]] = matches[2]
}
})
require('./lib/main').config(options)
require('./lib/main').config(
require('./lib/cli-options')(process.argv)
)
})()

@@ -1,3 +0,1 @@

'use strict'
const fs = require('fs')

@@ -17,3 +15,3 @@ const path = require('path')

// matching "KEY' and 'VAL' in 'KEY=VAL'
const keyValueArr = line.match(/^\s*([\w\.\-]+)\s*=\s*(.*)?\s*$/)
const keyValueArr = line.match(/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/)
// matched?

@@ -20,0 +18,0 @@ if (keyValueArr != null) {

{
"name": "dotenv",
"version": "5.0.1",
"version": "6.0.0",
"description": "Loads environment variables from .env file",

@@ -8,4 +8,3 @@ "main": "lib/main.js",

"pretest": "npm run lint",
"test": "lab",
"ci:coverage": "lab test/* -r lcov | coveralls",
"test": "tap tests/*.js --100",
"lint": "standard",

@@ -32,14 +31,11 @@ "postlint": "npm run lint-md",

"devDependencies": {
"babel": "5.8.23",
"coveralls": "^2.11.9",
"lab": "^14.3.2",
"should": "11.1.1",
"sinon": "1.17.6",
"standard": "8.4.0",
"standard-markdown": "2.2.0"
"sinon": "^5.0.2",
"standard": "^11.0.1",
"standard-markdown": "^4.0.2",
"tap": "^11.1.4"
},
"dependencies": {},
"engines": {
"node": ">=4.6.0"
"node": ">=6"
}
}

@@ -16,3 +16,7 @@ # dotenv

```bash
npm install dotenv --save
# with npm
npm install dotenv
# or with Yarn
yarn add dotenv
```

@@ -117,3 +121,3 @@

const dotenv = require('dotenv')
const buf = new Buffer('BASIC=basic')
const buf = Buffer.from('BASIC=basic')
const config = dotenv.parse(buf) // will return an object

@@ -214,5 +218,5 @@ console.log(typeof config, config) // object { BASIC : 'basic' }

import dotenv from 'dotenv'
import errorReporter from './errorReporter'
dotenv.config()
import errorReporter from './errorReporter'
errorReporter.client.report(new Error('faq example'))

@@ -219,0 +223,0 @@ ```

Sorry, the diff of this file is not supported yet

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