param rating param precision function roundRating ( rating , precision = 1 ) { if ( precision <= 0 ) { return Math . floor ( rating ) ; } const rounder = Math . pow ( 10 , precision ) ; return Math . floor ( rating * rounder ) / rounder ; } export default roundRating ;