Dividindo um número em dígitos JavaScript
export const parseDigit = (str) => {
return str.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ')
}
Injury
export const parseDigit = (str) => {
return str.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ')
}