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 3.0.3 to 3.1.0

3

index.d.ts

@@ -14,5 +14,6 @@ interface EnvironmentSpec {

interface Options {
parsers?: Parser[]
parsers?: Parser[],
mutable?: Boolean
}
export default function configeur(environment: Environment, options?: Options): Object;

@@ -7,5 +7,5 @@ 'use strict';

module.exports = function configeur(schema, options = {}) {
return processConfig(schema, process.env, makeParsers(options.parsers));
return processConfig(schema, process.env, makeParsers(options.parsers), options.mutable);
};
module.exports.default = module.exports;

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

module.exports = function processConfig(schema, env, parsers) {
module.exports = function processConfig(schema, env, parsers, mutable) {
const config = Object.create(null);

@@ -39,3 +39,3 @@ const envNames = Object.getOwnPropertyNames(env);

return Object.freeze(config);
return mutable ? config : Object.freeze(config);
};
{
"name": "configeur",
"version": "3.0.3",
"version": "3.1.0",
"description": "Extensible parsing of environment variables into config.",

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

@@ -83,1 +83,8 @@ # configeur

```
#### `mutable`
By default, the object returned by configuer is frozen. Since it is also flat,
the object is completely immutable. The `mutable` option makes configeur return
an unfrozen object. This is not recommended in general, but may be useful for
testing purposes.
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