You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
612 B

4 years ago
  1. /* Built-in method references for those with the same name as other `lodash` methods. */
  2. var nativeMax = Math.max,
  3. nativeMin = Math.min;
  4. /**
  5. * The base implementation of `_.inRange` which doesn't coerce arguments.
  6. *
  7. * @private
  8. * @param {number} number The number to check.
  9. * @param {number} start The start of the range.
  10. * @param {number} end The end of the range.
  11. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  12. */
  13. function baseInRange(number, start, end) {
  14. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  15. }
  16. module.exports = baseInRange;