UNPKG

@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.

17 lines 420 B
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); }; }; export default buildFormatNumber;