From 11052f4d87ffc396039c233582c015c198dcf0bb Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 11 Jan 2017 00:03:53 -0800 Subject: [PATCH] Cleanup `baseRandom`. --- .internal/baseRandom.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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;