Skip to content

v1.0.0

Latest

Choose a tag to compare

@btroia btroia released this 10 Jan 00:50

Added

  • Initial stable release
  • Support for 165+ ISO 4217 currency codes
  • formatCurrency() function with proper symbol placement, thousands separators, and decimal formatting
  • getSupportedCurrencies() to list all available currencies
  • returnType option to return results as object ({ formatted, value, symbol }) instead of array
  • LRU cache (100 entries) for improved performance
  • clearFormatCache() and getFormatCacheSize() cache utilities
  • Full TypeScript support with exported types (FormatResult, FormatResultObject, CurrencyCode, CurrencyConfig, SupportedCurrency)
  • Zero runtime dependencies

Features

  • Handles negative amounts
  • Supports zero-decimal currencies (JPY, KRW)
  • Supports 3-decimal currencies (BHD, KWD, OMR)
  • Preserves extra decimal precision when provided
  • Added option to return result as an object instead of array
  • European format support (period for thousands, comma for decimals)