function round(num, precision) {
    if (precision === void 0) { precision = 0; }
    if (precision && !(precision >= 0)) {
        throw new Error("precision must be a positive number");
    }
    var multiplier = Math.pow(10, precision || 0);
    return Math.round(num * multiplier) / multiplier;
}
Round number to precision

@param {number} num Number
@param {number} [precision=0] Precision
@returns {number} rounded number
@example
turf.round(120.4321)
//=120

turf.round(120.4321, 2)
//=120.43