applySettings(srcobj, settings = {}) {
    const obj = srcobj || {};
    Object.keys(settings).forEach((key) => {
      if (obj[key] === undefined) {
        obj[key] = settings[key];
      }
    });
    return obj;
  }
Apply default settings to an object.
@param {object} obj Target object.
@param {object} settings Input settings.