extendOrAdd = (cfgObj, key, val) => {
      if (cfgObj[key] && typeof cfgObj[key] === 'object' && !Array.isArray(cfgObj[key])) {
        cfgObj[key] = mergeDeep(cfgObj[key], val)
      } else {
        cfgObj[key] = val
      }
    }
@param {module:SVGEditor.Config|module:SVGEditor.Prefs} cfgObj
@param {string} key
@param {any} val See {@link module:SVGEditor.Config} or {@link module:SVGEditor.Prefs}
@returns {void}