mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Math them all.
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
const nativeMax = Math.max
|
||||
const nativeMin = Math.min
|
||||
|
||||
/**
|
||||
* The base implementation of `inRange` which doesn't coerce arguments.
|
||||
*
|
||||
@@ -12,7 +8,7 @@ const nativeMin = Math.min
|
||||
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
||||
*/
|
||||
function baseInRange(number, start, end) {
|
||||
return number >= nativeMin(start, end) && number < nativeMax(start, end)
|
||||
return number >= Math.min(start, end) && number < Math.max(start, end)
|
||||
}
|
||||
|
||||
export default baseInRange
|
||||
|
||||
Reference in New Issue
Block a user