mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
15 lines
462 B
JavaScript
15 lines
462 B
JavaScript
/**
|
|
* The base implementation of `inRange` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {number} number The number to check.
|
|
* @param {number} start The start of the range.
|
|
* @param {number} end The end of the range.
|
|
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
|
*/
|
|
function baseInRange(number, start, end) {
|
|
return number >= Math.min(start, end) && number < Math.max(start, end)
|
|
}
|
|
|
|
export default baseInRange
|