forked from Qortal/qortal-ui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
523 B
22 lines
523 B
3 years ago
|
let config = require('./config.js')
|
||
|
|
||
|
const checkKeys = (storeObj, newObj) => {
|
||
|
for (const key in newObj) {
|
||
|
if (!Object.prototype.hasOwnProperty.call(storeObj, key)) return
|
||
|
|
||
|
if (typeof newObj[key] === 'object') {
|
||
|
storeObj[key] = checkKeys(storeObj[key], newObj[key])
|
||
|
} else {
|
||
|
storeObj[key] = newObj[key]
|
||
|
}
|
||
|
}
|
||
|
return storeObj
|
||
|
}
|
||
|
|
||
|
const getConfig = customConfig => {
|
||
|
config = checkKeys(config, customConfig)
|
||
|
return config
|
||
|
}
|
||
|
|
||
|
module.exports = getConfig
|