1.1.0 • Published 4 years ago

@plasma-platform/currency-formatter v1.1.0

Weekly downloads
76
License
CC-BY-4.0
Repository
gitlab
Last release
4 years ago

version nextVersion downloads license dependency


Full documentation
install:
npm i @plasma-platform/currency-formatter -S

Short documentation

Table of Contents

priceConversion

Price conversion from dollar to currency

Parameters

  • params object
    • params.price number price by dollar
    • params.rate number currency rate
    • params.roundingType string type of rounding

Returns number converted price with Math.round

backPriceConversion

Price conversion from currency to dollar

Parameters

  • params object
    • params.price number price by currency
    • params.rate number currency rate
    • params.roundingType string type of rounding

Returns number converted price with Math.round

getTmLocale

Get TM locale (TM locales: en, de, es, fr, it, uk, pl, tr, cs, nl, hu, sv, pt, ar, zh, ru)

Parameters

  • locale string locale to convert to tm locale

Returns string tm locale

getCurrencyByLang

Get currency code by lang (TM currencies: USD, EUR, PLN, TRY, CNY, BRL, HUF, SEK)

Parameters

  • lang string language to get tm currency

Returns string currency code

currencyFormatter

Currency formatting by locale using Intl.NumberFormat

Parameters

Returns string formatted convertible price string

1.1.0

4 years ago

1.0.16

4 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.14-alpha.0

5 years ago

1.0.13

5 years ago

1.0.13-alpha.0

5 years ago

1.0.12-alpha.0

5 years ago

1.0.11

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.8-alpha.0

5 years ago

1.0.7-alpha.0

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.1-alpha.0

5 years ago

1.0.1

5 years ago