const round = (val, d = 3) => { let factor = Math.pow(10, d); return Math.round(val * factor) / factor; }; export default round;