Comparing version 0.5.0 to 0.5.1
{ | ||
"name": "get-env", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Return `dev`, `prod`, or optional extra environements based on `process.env.NODE_ENV`", | ||
@@ -36,4 +36,4 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=6.5.0" | ||
} | ||
} |
@@ -15,3 +15,3 @@ [![NPM](https://nodei.co/npm/get-env.png?downloads=false&stars=false)](https://npmjs.org/package/get-env) [![NPM](https://nodei.co/npm-dl/get-env.png?months=6)](https://npmjs.org/package/get-env) | ||
var env = process.env.NODE_ENV || 'development'; | ||
const env = process.env.NODE_ENV || 'development'; | ||
@@ -32,3 +32,3 @@ 1. If your code tests against, `development` and `production` (for example), then you must only use those values for `NODE_ENV`. `get-env` library accepts multiple alternative values as rules for an environment, therefore you can make unlimited number of aliases to the same environment same. This lets you forget about the exact string value you used in your code, which means you can use whatever value that comes naturally to your mind whenever you switch environments. All environment names matched by this library are case-insensitive as well. | ||
```js | ||
var env = require('get-env')(); | ||
const env = require('get-env')(); | ||
``` | ||
@@ -39,3 +39,3 @@ | ||
```js | ||
var nodeEnv = (process.env.NODE_ENV || '').toLowerCase(); | ||
const nodeEnv = (process.env.NODE_ENV || '').toLowerCase(); | ||
var env; | ||
@@ -54,3 +54,3 @@ if (nodeEnv === 'prod' || nodeEnv === 'production') { | ||
```js | ||
var nodeEnv = process.env.NODE_ENV; | ||
const nodeEnv = process.env.NODE_ENV; | ||
var env; | ||
@@ -73,3 +73,3 @@ if (nodeEnv === 'production' || nodeEnv === 'prod') { | ||
```js | ||
var env = require('get-env')({ | ||
const env = require('get-env')({ | ||
staging: 'staging', | ||
@@ -99,3 +99,3 @@ test: ['test', 'testing'] | ||
```js | ||
var env = require('get-env')(); | ||
const env = require('get-env')(); | ||
``` | ||
@@ -110,3 +110,3 @@ | ||
```js | ||
var env = require('get-env')('test'); | ||
const env = require('get-env')('test'); | ||
``` | ||
@@ -120,5 +120,5 @@ | ||
```js | ||
var env = require('get-env')('docker', 'test'); | ||
const env = require('get-env')('docker', 'test'); | ||
// OR | ||
var env = require('get-env')(['docker', 'test']); | ||
const env = require('get-env')(['docker', 'test']); | ||
``` | ||
@@ -133,3 +133,3 @@ | ||
```js | ||
var env = require('get-env')({ | ||
const env = require('get-env')({ | ||
docker: 'docker', // or 'DOCKER' | ||
@@ -136,0 +136,0 @@ test: ['test', 'testing'], // or ['TEST', 'TESTING'] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9974