residue
Advanced tools
Comparing version 1.2.1 to 1.2.3
# Change Log | ||
## [1.2.3] | ||
- `loadConfiguration` now accepts object | ||
## [1.2.1] | ||
- Included folders updated | ||
## [1.2.0] | ||
@@ -4,0 +10,0 @@ ### Updates |
{ | ||
"name": "residue", | ||
"version": "1.2.1", | ||
"version": "1.2.3", | ||
"description": "Library to interact with residue server seamlessly.", | ||
@@ -5,0 +5,0 @@ "main": "src/residue.js", |
@@ -664,8 +664,8 @@ // | ||
const loadConfiguration = (jsonFilename) => { | ||
if (typeof jsonFilename === 'undefined') { | ||
Utils.log('Please select JSON filename that contains configurations'); | ||
const loadConfiguration = (jsonOrFilename) => { | ||
if (typeof jsonOrFilename === 'undefined') { | ||
Utils.log('Please select JSON or JSON filename that contains configurations'); | ||
return false; | ||
} | ||
Params.options = JSON.parse(fs.readFileSync(path.resolve(jsonFilename), 'utf8')); | ||
Params.options = typeof jsonOrFilename === 'object' ? jsonOrFilename : JSON.parse(fs.readFileSync(path.resolve(jsonOrFilename), 'utf8')); | ||
Utils.log('Configuration loaded'); | ||
@@ -672,0 +672,0 @@ return true; |
38064