Skip to content

Commit 7baf226

Browse files
committed
Cleanup createRound.
1 parent c6854fa commit 7baf226

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.internal/createRound.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import toInteger from './toInteger.js';
22
import toNumber from './toNumber.js';
33
import toString from './toString.js';
44

5-
/* Built-in method references for those with the same name as other `lodash` methods. */
6-
const nativeMin = Math.min;
7-
85
/**
96
* Creates a function like `round`.
107
*
@@ -16,7 +13,7 @@ function createRound(methodName) {
1613
const func = Math[methodName];
1714
return (number, precision) => {
1815
number = toNumber(number);
19-
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
16+
precision = precision == null ? 0 : Math.min(toInteger(precision), 292);
2017
if (precision) {
2118
// Shift with exponential notation to avoid floating-point issues.
2219
// See [MDN](https://mdn.io/round#Examples) for more details.

0 commit comments

Comments
 (0)