Socket
Socket
Sign inDemoInstall

envboss

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "envboss",
"version": "1.0.1",
"version": "1.0.2",
"description": "package for environment variables",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -17,8 +17,10 @@ [![Known Vulnerabilities](https://snyk.io/test/github/PayU/envboss/badge.svg?targetFile=package.json)](https://snyk.io/test/github/PayU/envboss?targetFile=package.json)

## How does it work?
It takes each <ENV_PARAM_NAME> from `process.env` and creates an environmentVariables object with `process.env[<ENV_PARAM_NAME>]`
as it's value, so you can require it from anywhere.
It goes over the configuration you provide, and returns an object where the `key` is the `<ENV_PARAM_NAME>` and the value is `process.env[<ENV_PARAM_NAME>]` after it was validated and sanitized.
### configuration
If you wouldn't like to validate envparams(e.g. in tests) pass pass false to
```createEnvObject(ENV_VARS_CONFIG,false)```
`mandatory` - sets this param as mandatory.
`default` - lets you define a default value.
`validationFunction` - will help you validate the values.

@@ -31,2 +33,6 @@

If you wouldn't like to validate envparams(e.g. in tests) pass pass false to
```createEnvObject(ENV_VARS_CONFIG,false)```

@@ -33,0 +39,0 @@ ***Installation***

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