node-settings
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -60,3 +60,3 @@ (function() { | ||
return process.nextTick(function() { | ||
return callback(eval(data)); | ||
return callback(JSON.parse(data)); | ||
}); | ||
@@ -68,3 +68,3 @@ }); | ||
data = fs.readFileSync(options.location, options.encoding || 'utf8'); | ||
return eval(data); | ||
return JSON.parse(data); | ||
} | ||
@@ -84,6 +84,6 @@ }, | ||
get: function(options, callback) { | ||
return callback(eval(options.data)); | ||
return callback(JSON.parse(options.data)); | ||
}, | ||
getSync: function(options) { | ||
return eval(options.data); | ||
return JSON.parse(options.data); | ||
} | ||
@@ -90,0 +90,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"description": "Provides easy, multi-environment configuration", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"homepage": "", | ||
@@ -8,0 +8,0 @@ "repository": { |
{ | ||
key1: 'value1' | ||
"default": { | ||
"mongo": { | ||
"host": "localhost", | ||
"port": 27017, | ||
"database": "test" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
10975
88
0