@mui/material
Version:
Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.
23 lines (22 loc) • 544 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
const buildFormatNumber = locale => {
let formatter;
if (typeof Intl !== 'undefined' && Intl.NumberFormat) {
try {
formatter = new Intl.NumberFormat(locale);
} catch {
// fallback to String()
}
}
return value => {
if (!Number.isFinite(value)) {
return String(value);
}
return formatter ? formatter.format(value) : String(value);
};
};
var _default = exports.default = buildFormatNumber;