UNPKG

@fireflyai/backstage-plugin-firefly

Version:
14 lines (12 loc) 446 B
const numberWithCommas = (x) => { const y = parseFloat(x).toFixed(2).split("."); const formattedInteger = y[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); const formattedDecimal = +y[1] ? `.${y[1]}` : ""; const output = `${formattedInteger}${formattedDecimal}`; return output; }; const capitalize = (x) => { return x.charAt(0).toUpperCase() + x.slice(1); }; export { capitalize, numberWithCommas }; //# sourceMappingURL=common.esm.js.map