const formatIfNumber = (value, numberOfPlaces) => value / 2 ? Number(Math.round(value + 'e' + numberOfPlaces) + 'e-' + numberOfPlaces) : value
function formatIfNumber(value, numberOfPlaces) {return value / 2 ? Number(Math.round(value + 'e' + numberOfPlaces) + 'e-' + numberOfPlaces) : value;}- const formatIfNumber = (value, numberOfPlaces) =>
- value / 2
- ? Number(Math.round(value + 'e' + numberOfPlaces) + 'e-' + numberOfPlaces)
- : value