From 7baf2267a0a87d3a528c156fb9cd5f9c262e32bc Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 11 Jan 2017 10:00:00 -0800 Subject: [PATCH] Cleanup `createRound`. --- .internal/createRound.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.internal/createRound.js b/.internal/createRound.js index 3e0ddeca6..caf020254 100644 --- a/.internal/createRound.js +++ b/.internal/createRound.js @@ -2,9 +2,6 @@ import toInteger from './toInteger.js'; import toNumber from './toNumber.js'; import toString from './toString.js'; -/* Built-in method references for those with the same name as other `lodash` methods. */ -const nativeMin = Math.min; - /** * Creates a function like `round`. * @@ -16,7 +13,7 @@ function createRound(methodName) { const func = Math[methodName]; return (number, precision) => { number = toNumber(number); - precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + precision = precision == null ? 0 : Math.min(toInteger(precision), 292); if (precision) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details.