Socket
Socket
Sign inDemoInstall

cnf

Package Overview
Dependencies
7
Maintainers
9
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.3.2 to 3.3.3

21

package.json
{
"name": "cnf",
"version": "3.3.2",
"version": "3.3.3",
"description": "Configuration loader",
"scripts": {
"test": "istanbul cover _mocha",
"coveralls": "cat ./coverage/lcov.info | coveralls"
"test": "mocha"
},
"devDependencies": {
"@debitoor/eslint-config-debitoor": "2.3.0",
"@debitoor/eslint-config-debitoor": "3.0.2",
"@debitoor/mocha-strict-dependencies": "1.1.0",
"chai": "4.1.2",
"coveralls": "3.0.1",
"istanbul": "0.4.5",
"mocha": "5.2.0",
"mocha-eslint": "4.1.0",
"sinon": "5.0.10",
"sinon-chai": "3.1.0"
"chai": "4.2.0",
"mocha": "6.2.0",
"mocha-eslint": "5.0.0",
"sinon": "7.5.0",
"sinon-chai": "3.3.0"
},

@@ -23,3 +20,3 @@ "main": "./source/config.js",

"deep-extend": "0.6.0",
"resolve": "1.7.1"
"resolve": "1.12.0"
},

@@ -26,0 +23,0 @@ "repository": {

@@ -1,2 +0,2 @@

cnf [![npm version](https://badge.fury.io/js/cnf.svg)](http://badge.fury.io/js/cnf) [![Build Status](https://travis-ci.org/debitoor/cnf.svg?branch=master)](https://travis-ci.org/debitoor/cnf) [![Dependency Status](https://david-dm.org/debitoor/cnf.svg)](https://david-dm.org/debitoor/cnf) [![devDependency Status](https://david-dm.org/debitoor/cnf/dev-status.svg)](https://david-dm.org/debitoor/cnf#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/debitoor/cnf/badge.svg?branch=master&service=github)](https://coveralls.io/github/debitoor/cnf?branch=master)
cnf [![npm version](https://badge.fury.io/js/cnf.svg)](http://badge.fury.io/js/cnf) [![Build Status](https://travis-ci.org/debitoor/cnf.svg?branch=master)](https://travis-ci.org/debitoor/cnf) [![Dependency Status](https://david-dm.org/debitoor/cnf.svg)](https://david-dm.org/debitoor/cnf) [![devDependency Status](https://david-dm.org/debitoor/cnf/dev-status.svg)](https://david-dm.org/debitoor/cnf#info=devDependencies)
===

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

@@ -52,5 +52,5 @@ const resolve = require('resolve');

const replaceConfigs = function (visit) {
const next = function (prevKeys, obj) {
Object.keys(obj).forEach(function (key) {
const replaceConfigs = function(visit) {
const next = function(prevKeys, obj) {
Object.keys(obj).forEach(function(key) {
const keys = prevKeys.concat(key);

@@ -68,3 +68,3 @@

};
const lookupConfig = function (key) {
const lookupConfig = function(key) {
if (!key.length) {

@@ -76,3 +76,3 @@ return envFile;

}
return key.reduce(function (result, key) {
return key.reduce(function(result, key) {
return result && result[key];

@@ -82,5 +82,5 @@ }, envFile);

process.argv.filter(function (arg) {
process.argv.filter(function(arg) {
return arg.indexOf('--app.') === 0;
}).map(function (arg) {
}).map(function(arg) {
const value = process.argv[process.argv.indexOf(arg) + 1];

@@ -94,3 +94,3 @@ const key = arg.split('.').slice(1);

return result;
}).forEach(function (item) {
}).forEach(function(item) {
const parent = lookupConfig(item.parent);

@@ -106,7 +106,7 @@

replaceConfigs(function (keys, value) {
replaceConfigs(function(keys, value) {
if (typeof value !== 'string') {
return value;
}
value = value.replace(/\$\(([^\)]+)\)/g, function (_, key) {
value = value.replace(/\$\(([^\)]+)\)/g, function(_, key) {
return lookupConfig(key);

@@ -113,0 +113,0 @@ });

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