@hhgtech/hhg-components
Version:
Hello Health Group common components
19 lines (15 loc) • 508 B
JavaScript
;
var constants = require('./constants-a807fed2.js');
function isDefined(argument) {
return argument !== undefined && argument !== null;
}
function currencyFormat(x, locale, currency) {
if (!x || !locale)
return `0 ${constants.COUNTRY_CURRENCY_SYMBOL['vi-VN'] || ''}`;
return new Intl.NumberFormat(locale, {
style: 'currency',
currency: currency,
}).format(Number(x));
}
exports.currencyFormat = currencyFormat;
exports.isDefined = isDefined;