index.js
function(number, precision) {

    const multiplier = !!precision ? Math.pow(10, precision) : 1;

    return Math.floor(number * multiplier) / multiplier;
  }
function(number, precision) {

    const multiplier = !!precision ? Math.pow(10, precision) : 1;

    return Math.floor(number * multiplier) / multiplier;
  }
function ( number , precision ) { const multiplier = ! ! precision ? Math . pow ( 10 , precision ) : 1 ; return Math . floor ( number * multiplier ) / multiplier ; }
Math.floor with 'precision' parameter

@param {number} number
@param {number} precision

@return {number}
Math . floor with precision parameter