Files
lodash/.internal/baseInRange.js
Michał Lipiński 2538a56577 Math them all.
2017-04-04 22:38:50 +02:00

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