* Checks if `n` is between `start` and up to, but not including, `end`. If * `end` is not specified, it's set to `start` with `start` then set to `0`. * If `start` is greater than `end` the params are swapped to support * negative ranges. * * @static * @memberOf _
(number, start, end)
| 14132 | * // => true |
| 14133 | */ |
| 14134 | function inRange(number, start, end) { |
| 14135 | start = toFinite(start); |
| 14136 | if (end === undefined) { |
| 14137 | end = start; |
| 14138 | start = 0; |
| 14139 | } else { |
| 14140 | end = toFinite(end); |
| 14141 | } |
| 14142 | number = toNumber(number); |
| 14143 | return baseInRange(number, start, end); |
| 14144 | } |
| 14145 | |
| 14146 | /** |
| 14147 | * Produces a random number between the inclusive `lower` and `upper` bounds. |
nothing calls this directly
no test coverage detected