diff --git a/CHANGELOG.md b/CHANGELOG.md index d8b2c46..c490402 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # deverything +## 0.49.0 + +### Minor Changes + +- isStrictlyBetween + ## 0.48.1 ### Patch Changes diff --git a/README.md b/README.md index ebe5510..d13f000 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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()` @@ -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()` diff --git a/package.json b/package.json index f9690f4..e7c2e15 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/math/index.ts b/src/math/index.ts index dc11e28..f4648e3 100644 --- a/src/math/index.ts +++ b/src/math/index.ts @@ -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"; diff --git a/src/math/isStrictlyBetween.ts b/src/math/isStrictlyBetween.ts new file mode 100644 index 0000000..4d932eb --- /dev/null +++ b/src/math/isStrictlyBetween.ts @@ -0,0 +1,3 @@ +export const isStrictlyBetween = (value: number, min: number, max: number) => { + return value > min && value < max; +};