config-file
Advanced tools
+1
-1
| { | ||
| "name": "config-file", | ||
| "version": "0.1.4", | ||
| "version": "0.1.5", | ||
| "main": [ | ||
@@ -5,0 +5,0 @@ "index.js" |
+8
-7
@@ -24,2 +24,3 @@ /** | ||
| /** | ||
@@ -43,8 +44,7 @@ * Export `config` | ||
| var filename = path.basename(filepath); | ||
| var homeConfig = file.findFile(home(filename)); | ||
| var localConfig = file.findFile(local(filepath || pkg)); | ||
| if(localConfig !== null) { | ||
| return localConfig; | ||
| } else if (homeConfig !== null) { | ||
| return homeConfig; | ||
| if(file.findFile(local(filepath || pkg)) !== null) { | ||
| return file.findFile(local(filepath || pkg)); | ||
| } else if (file.findFile(home(filename)) !== null) { | ||
| return file.findFile(home(filename)); | ||
| } else { | ||
@@ -67,3 +67,4 @@ return; | ||
| config.load = function(filename, options) { | ||
| var opts = _.extend({parse: 'json'}, options); | ||
| var opts = _.extend({}, options); | ||
| // If no filename is specified, config.find will | ||
@@ -70,0 +71,0 @@ // automatically load 'package.json' |
+3
-1
| { | ||
| "name": "config-file", | ||
| "version": "0.1.4", | ||
| "version": "0.1.5", | ||
| "description": "Find and load a YAML or JSON config file from a local project, installed npm module, or the user's home directory.", | ||
@@ -37,2 +37,4 @@ "repository": { | ||
| "config file", | ||
| "load config", | ||
| "config store", | ||
| "configuration", | ||
@@ -39,0 +41,0 @@ "runtime config" |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
8193
0.12%145
-1.36%