1.0.4 • Published 8 months ago

currency-format-symbol v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Currency Format Symbol

NPM JavaScript Style Guide

Install

npm install currency-format-symbol
yarn add currency-format-symbol

Parameters

  • amount (Default: '0.00'): The numeric value to be formatted.
  • currency (Default: false): Specifies whether currency formatting should be applied.
  • useGrouping (Default: true): Indicates whether to use grouping separators.
  • currencyDisplay (Default: 'code'): Determines the currency display format ('code' or 'symbol').
  • minDigit (Default: 0): The minimum number of decimal places.
  • maxDigit (Default: 2): The maximum number of decimal places.
  • locale (Default: 'en-US'): The locale used for formatting.
  • currencyPosition (Default: 'end'): Specifies where the currency symbol or code should appear ('start' or 'end').

Return Value

  • A string representing the formatted currency value.

Usage Example

import { CurrencyFormat } from 'currency-format-symbol'
const App = () => {
  return <>
    <CurrencyFormat amount="1234567.89" />
    <CurrencyFormat amount="1234567.89" locale="tr-TR" currency="TRY" currencyDisplay="symbol"/>
  </>
}
export default App

License

MIT © sencerarslan

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago