Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

configeur

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

configeur - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

8

lib/processConfig.js

@@ -12,3 +12,3 @@ 'use strict';

module.exports = function processConfig(schema, env, parsers) {
const config = new Map();
const config = Object.create(null);
const envNames = Object.getOwnPropertyNames(env);

@@ -27,5 +27,5 @@ const missingRequiredProperties = [];

if (envNames.includes(optionName)) {
config.set(optionName, parse(env[optionName], parser));
config[optionName] = parse(env[optionName], parser);
} else if (!optionProperties.required) {
config.set(optionName, parse(optionProperties.defaultValue, parser));
config[optionName] = parse(optionProperties.defaultValue, parser);
} else {

@@ -40,3 +40,3 @@ missingRequiredProperties.push(optionName);

return config;
return Object.freeze(config);
};
{
"name": "configeur",
"version": "2.0.0",
"version": "3.0.0",
"description": "Extensible parsing of environment variables into config.",

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

@@ -38,5 +38,11 @@ # configeur

The above, assuming no values are read from the environment, will assign
config.js a `Map` instance with one key `PORT` with a value of `8000`.
The above, assuming no values are read from the environment, will assign to
config.js:
```javascript
{
PORT: 8000
}
```
Fields used to configure a config variable are:

@@ -43,0 +49,0 @@

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