function formatAmount(modelValue, givenOptions) {
  /** @type {FormatOptions} */
  const options = {
    currency: 'EUR',
    ...givenOptions,
  };

  if (typeof options.minimumFractionDigits === 'undefined') {
    options.minimumFractionDigits = getFractionDigits(options.currency);
  }
  if (typeof options.maximumFractionDigits === 'undefined') {
    options.maximumFractionDigits = getFractionDigits(options.currency);
  }

  return formatNumber(modelValue, options);
}
Formats a number considering the default fraction digits provided by Intl.

@param {number} modelValue Number to format
@param {FormatOptions} [givenOptions]