mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 17:55:51 +00:00
22 lines
466 B
JavaScript
22 lines
466 B
JavaScript
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 |