diff --git a/.internal/baseRandom.js b/.internal/baseRandom.js index 8c4e7652a..96a53006e 100644 --- a/.internal/baseRandom.js +++ b/.internal/baseRandom.js @@ -1,7 +1,3 @@ -/* Built-in method references for those with the same name as other `lodash` methods. */ -const nativeFloor = Math.floor; -const nativeRandom = Math.random; - /** * The base implementation of `random` without support for returning * floating-point numbers. @@ -12,7 +8,7 @@ const nativeRandom = Math.random; * @returns {number} Returns the random number. */ function baseRandom(lower, upper) { - return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + return lower + Math.floor(Math.random() * (upper - lower + 1)); } export default baseRandom;