Add positive and negative number checks

This commit is contained in:
Eugene 2023-07-14 13:03:21 +01:00
parent 9265e9072d
commit 320bfdf9b5
3 changed files with 95 additions and 0 deletions

View file

@ -410,6 +410,14 @@ function foo() {
foo();
```
#### .positiveNumber(value)
Check if `value` is a number and is more than 0.
#### .negativeNumber(value)
Check if `value` is a number and is less than 0.
##### .inRange(value, range)
Check if `value` (number) is in the given `range`. The range is an array of two values, lower bound and upper bound, in no specific order.