Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isStrictlyBetween #16

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
};
Comment on lines +1 to +3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead simple ❤️

Loading