Skip to content

round()

Works like parseFloat(number.toFixed(4)) but performance better

Example:

ts
round(191.212999999999999999999999, 4) // 191.213

Released under the MIT License.