Skip to content

Commit

Permalink
isStrictlyBetween (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
ogroppo authored Apr 8, 2024
1 parent 728a521 commit 3831c48
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# deverything

## 0.49.0

### Minor Changes

- isStrictlyBetween

## 0.48.1

### Patch Changes
Expand Down
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Contributions always welcome!

### Validators

- `isArray()`
- `isBoolean()`
- `isArray()`
- `isBoolean()`
- `isBrowser()` to detect if you are on the browser
- `isBuffer()` if it's a buffer
- `isClient()` same as isBrowser
Expand All @@ -26,20 +26,20 @@ Contributions always welcome!
- `isEmptyArray()` checks if the array has no items
- `isEmptyObject()` checks if the object has no keys
- `isFile()` if it's a file
- `isFunction()`
- `isFunction()`
- `isJsDate()` if it's a **valid** javascript's Date
- `isFutureDate()`
- `isPastDate()`
- `isFutureDate()`
- `isPastDate()`
- `isStringDate()` also checks if the string passed is a **valid** date
- `isKey()` is a real key of an object
- `isLastIndex()` is the index is the last item of array
- `isNotEmptyString()` must have some text, checks for spaces-only
- `isNumber()` if the arg is number, and also usable (no infinity)
- `isInt()` if it's an integer
- `isEven()`
- `isOdd()`
- `isPositiveInt()`
- `isNegativeInt()`
- `isEven()`
- `isOdd()`
- `isPositiveInt()`
- `isNegativeInt()`
- `isNumeric()` if string is representing a number
-`isObject()` if it's a js plain Object
- `isPromise()` if it's a promise
Expand All @@ -49,12 +49,15 @@ Contributions always welcome!
-`isSame()` Compare if dates, functions, arrays, objects or anything else are the same
- `isServer()` if you are on the server
- `isString()`
- `isURL()`
- `isURL()`
- `isUUID()` if it's a valid UUID

### Math

- `average()`
- `isBetween()`
- `isOutside()`
- `isStrictlyBetween()`
- `max()`
- `min()`
- `multiply()`
Expand Down Expand Up @@ -112,7 +115,7 @@ Contributions always welcome!

These functions are optimized for low entropy random data generation useful for Unit Testing, Storybook, Pass real validations, Reverse hacking, Penetration testing...

- `randomAddress()`
- `randomAddress()`
- `randomAlphaNumericCode()`
-`randomArrayItem()` now supporting non-uniform distribution
- `randomBankAccount()`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deverything",
"version": "0.48.1",
"version": "0.49.0",
"description": "Everything you need for Dev",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
3 changes: 2 additions & 1 deletion src/math/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
export * from "./average";
export * from "./isBetween";
export * from "./isOutside";
export * from "./isStrictlyBetween";
export * from "./max";
export * from "./min";
export * from "./multiply";
export * from "./isOutside";
export * from "./percentageChange";
export * from "./sum";
3 changes: 3 additions & 0 deletions src/math/isStrictlyBetween.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const isStrictlyBetween = (value: number, min: number, max: number) => {
return value > min && value < max;
};

0 comments on commit 3831c48

Please sign in to comment.