@depay/local-currency
Advanced tools
Comparing version 3.3.0 to 3.4.0
@@ -463,4 +463,4 @@ var timezoneToCurrency = { | ||
toString() { | ||
return new Intl.NumberFormat(navigator.language, { | ||
toString(options = {}) { | ||
return new Intl.NumberFormat(navigator.language, {...options, | ||
style: 'currency', | ||
@@ -467,0 +467,0 @@ currency: this.code, |
@@ -469,4 +469,4 @@ (function (global, factory) { | ||
toString() { | ||
return new Intl.NumberFormat(navigator.language, { | ||
toString(options = {}) { | ||
return new Intl.NumberFormat(navigator.language, {...options, | ||
style: 'currency', | ||
@@ -473,0 +473,0 @@ currency: this.code, |
{ | ||
"name": "@depay/local-currency", | ||
"moduleName": "LocalCurrency", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"description": "JavaScript library that detects user's local currency and provides functionalities to convert between multiple currencies.", | ||
@@ -6,0 +6,0 @@ "main": "dist/umd/index.js", |
@@ -49,2 +49,9 @@ ## Quickstart | ||
`options`: accepts options object that will be forwarded to `Intl.NumberFormat` | ||
```javascript | ||
new LocalCurrency.Currency({ amount: 20 }).toString({ maximumFractionDigits: 0 }) | ||
// $20 | ||
``` | ||
### fromUSD | ||
@@ -51,0 +58,0 @@ |
32785
98