
* remove classes in shipping & products utils * remove classes * add tests plans * add const * tests for shipping methods * test for shipping * test for shipping * tests for shipping * install eslint-plugin-chai-friendly * update stories * add missing imports
8 lines
288 B
JavaScript
8 lines
288 B
JavaScript
export function getFormattedCurrencyAmount(amount, currency) {
|
|
const language = window.navigator.userLanguage || window.navigator.language;
|
|
const formattedCurrencyAmount = amount.toLocaleString(language, {
|
|
currency,
|
|
style: "currency"
|
|
});
|
|
return formattedCurrencyAmount;
|
|
}
|