function formatGAQuery(query) {
  if (!query) {
    return "";
  }
  const object = {};
  for (const param of GA_ORDERED_PARAMS) {
    if (query[param] != null) {
      object[param] = query[param];
    }
  }
  return JSON.stringify(object, null, 2);
}
// does 3 things: removes null values, sorts the keys by the order in the documentation, and formats with 2 space indents
does 3 things: removes null values, sorts the keys by the order in the documentation, and formats with 2 space indents
does 3 things : removes null values sorts the keys by the order in the documentation and formats with 2 space indents
function formatGAQuery(query) {
  if (!query) {
    return "";
  }
  const object = {};
  for (const param of GA_ORDERED_PARAMS) {
    if (query[param] != null) {
      object[param] = query[param];
    }
  }
  return JSON.stringify(object, null, 2);
}
function formatGAQuery ( query ) { if ( ! query ) { return "" ; } const object = { } ; for ( const param of GA_ORDERED_PARAMS ) { if ( query [ param ] != null ) { object [ param ] = query [ param ] ; } } return JSON . stringify ( object , null , 2 ) ; }
does 3 things: removes null values, sorts the keys by the order in the documentation, and formats with 2 space indents
does 3 things : removes null values sorts the keys by the order in the documentation and formats with 2 space indents