Computes number rounded to precision.
number
precision
round(4.006); // 4round(4.006, 2); // 4.01round(4060, -2); // 4100 Copy
round(4.006); // 4round(4.006, 2); // 4.01round(4060, -2); // 4100
Differences from lodash:
NaN
Contribution to minified bundle size, when it is the only function imported:
Computes
numberrounded toprecision.Differences from lodash:
NaNwith largeprecisionvaluesContribution to minified bundle size, when it is the only function imported: