A minimal currency formatting utility extracted from vue2-filters, providing basic locale-aware currency formatting without relying on Intl.NumberFormat. Version 1.0.4 is the latest stable release; no active development or release cadence is evident. It supports simple symbol and decimal formatting with configurable currency symbol and decimal separator. Suitable for lightweight projects where Intl is unavailable or undesired, but lacks modern features like fractional digits control and extended locale support.
npm install simple-currency-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of formatCurrency with options for symbol, decimal separator, precision, and thousands separator.
Prepend '-' manually or use a more robust library.
Use Math.round before passing the value.
Consider alternatives like accounting-js or Intl.NumberFormat.
Use import { currencyFormatter } from 'simple-currency-formatter' and call it accordingly.Ensure the amount is a valid number: formatCurrency(Number(amount) || 0, options)
Switch to ES modules: import { formatCurrency } from 'simple-currency-formatter'.No dependency data recorded yet.