function _mergeUpdate(original, k, v, { insertKeys, insertValues, enforceTypes, overwrite, recursive } = {}, _d) {
  const x = original[k];
  const tv = getType(v);
  const tx = getType(x);

  // Recursively merge an inner object
  if (tv === 'Object' && tx === 'Object' && recursive) {
    return mergeObject(
      x,
      v,
      {
        insertKeys: insertKeys,
        insertValues: insertValues,
        overwrite: overwrite,
        inplace: true,
        enforceTypes: enforceTypes,
      },
      _d,
    );
  }

  // Overwrite an existing value
  if (overwrite) {
    if (tx !== 'undefined' && tv !== tx && enforceTypes) {
      throw new Error(`Mismatched data types encountered during object merge.`);
    }
    original[k] = v;
  }
}
/**
 * A helper function for merging objects when the target key exists in the original
 * @private
 */
A helper function for merging objects when the target key exists in the original
@private
A helper function for merging objects when the target key exists in the original @private
function _mergeUpdate(original, k, v, { insertKeys, insertValues, enforceTypes, overwrite, recursive } = {}, _d) {
  const x = original[k];
  const tv = getType(v);
  const tx = getType(x);
  if (tv === 'Object' && tx === 'Object' && recursive) {
    return mergeObject(
      x,
      v,
      {
        insertKeys: insertKeys,
        insertValues: insertValues,
        overwrite: overwrite,
        inplace: true,
        enforceTypes: enforceTypes,
      },
      _d,
    );
  }
  if (overwrite) {
    if (tx !== 'undefined' && tv !== tx && enforceTypes) {
      throw new Error(`Mismatched data types encountered during object merge.`);
    }
    original[k] = v;
  }
}
function _mergeUpdate ( original , k , v , { insertKeys , insertValues , enforceTypes , overwrite , recursive } = { } , _d ) { const x = original [ k ] ; const tv = getType ( v ) ; const tx = getType ( x ) ; if ( tv === 'Object' && tx === 'Object' && recursive ) { return mergeObject ( x , v , { insertKeys : insertKeys , insertValues : insertValues , overwrite : overwrite , inplace : true , enforceTypes : enforceTypes , } , _d , ) ; } if ( overwrite ) { if ( tx !== 'undefined' && tv !== tx && enforceTypes ) { throw new Error ( ` ` ) ; } original [ k ] = v ; } }
A helper function for merging objects when the target key exists in the original
 @private
A helper function for merging objects when the target key exists in the original @private
// Recursively merge an inner object // Overwrite an existing value