text: const isEmptyObject = obj =>
    !Array.isArray(obj) &&
    typeof obj === 'object' &&
    obj !== null &&
    Object.keys(obj).length === 0;
  
  // export const cleanEmptyAndNegativeValues = obj => Object.fromEntries(
  //   Object.entries( obj )
  //     .filter( ( [ , v ] ) => v && v !== -1 && ! isEmptyObject( v ) )
  //     .map( ( [ k, v ] ) =>
  //       [ k, Array.isArray( v ) && v === Object( v ) ? cleanEmptyAndNegativeValues( v ) : v ] ),
  // );
  
  export const cleanEmptyAndNegativeValues = obj => {
    Object.keys(obj).forEach(
      k =>
        (obj[k] == null || isEmptyObject(obj[k]) || obj[k] === -1) &&
        // eslint-disable-next-line no-param-reassign
        delete obj[k],
    );
    return obj;
  };
  