Function formatCurrency

  • Format an amount as a currency string using the en-IN locale.

    Falls back to INR when currency is missing or unsupported. Only the magnitude is formatted (the sign is handled by the caller). Formatters are cached per currency code.

    Parameters

    • amount: number

      The numeric amount (sign is ignored).

    • Optionalcurrency: string

      ISO code; one of INR/USD/EUR/GBP/AED/SGD, else INR.

    Returns string

    The formatted currency string, e.g. ₹1,234.50.