2 lines
116 B
JavaScript
2 lines
116 B
JavaScript
const round = (n, decimals = 0) => Number(`${Math.round(`${n}e${decimals}`)}e-${decimals}`);
|
|
module.exports = round |