is-what 5.3.0 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -18,9 +18,11 @@ export { isFunction } from './isFunction.js';
18
18
  export type { AnyFunction } from './isFunction.js';
19
19
  export { isHexDecimal } from './isHexDecimal.js';
20
20
  export { isInstanceOf } from './isInstanceOf.js';
21
+ export { isInteger } from './isInteger.js';
21
22
  export { isIterable } from './isIterable.js';
22
23
  export { isMap } from './isMap.js';
23
24
  export { isNaNValue } from './isNaNValue.js';
25
+ export { isNegativeInteger } from './isNegativeInteger.js';
24
26
  export { isNegativeNumber } from './isNegativeNumber.js';
25
27
  export { isNull } from './isNull.js';
26
28
  export { isNullOrUndefined } from './isNullOrUndefined.js';
@@ -30,6 +32,7 @@ export { isObjectLike } from './isObjectLike.js';
30
32
  export { isOneOf } from './isOneOf.js';
31
33
  export { isPlainObject } from './isPlainObject.js';
32
34
  export type { PlainObject } from './isPlainObject.js';
35
+ export { isPositiveInteger } from './isPositiveInteger.js';
33
36
  export { isPositiveNumber } from './isPositiveNumber.js';
34
37
  export { isPrimitive } from './isPrimitive.js';
35
38
  export { isPromise } from './isPromise.js';
package/dist/index.js CHANGED
@@ -16,9 +16,11 @@ export { isFullString } from './isFullString.js';
16
16
  export { isFunction } from './isFunction.js';
17
17
  export { isHexDecimal } from './isHexDecimal.js';
18
18
  export { isInstanceOf } from './isInstanceOf.js';
19
+ export { isInteger } from './isInteger.js';
19
20
  export { isIterable } from './isIterable.js';
20
21
  export { isMap } from './isMap.js';
21
22
  export { isNaNValue } from './isNaNValue.js';
23
+ export { isNegativeInteger } from './isNegativeInteger.js';
22
24
  export { isNegativeNumber } from './isNegativeNumber.js';
23
25
  export { isNull } from './isNull.js';
24
26
  export { isNullOrUndefined } from './isNullOrUndefined.js';
@@ -27,6 +29,7 @@ export { isObject } from './isObject.js';
27
29
  export { isObjectLike } from './isObjectLike.js';
28
30
  export { isOneOf } from './isOneOf.js';
29
31
  export { isPlainObject } from './isPlainObject.js';
32
+ export { isPositiveInteger } from './isPositiveInteger.js';
30
33
  export { isPositiveNumber } from './isPositiveNumber.js';
31
34
  export { isPrimitive } from './isPrimitive.js';
32
35
  export { isPromise } from './isPromise.js';
@@ -0,0 +1,2 @@
1
+ /** Returns whether the payload is an integer number */
2
+ export declare function isInteger(payload: unknown): payload is number;
@@ -0,0 +1,5 @@
1
+ import { getType } from './getType.js';
2
+ /** Returns whether the payload is an integer number */
3
+ export function isInteger(payload) {
4
+ return getType(payload) === 'Number' && Number.isInteger(payload);
5
+ }
@@ -0,0 +1,2 @@
1
+ /** Returns whether the payload is a negative Integer (but not 0) */
2
+ export declare function isNegativeInteger(payload: unknown): payload is number;
@@ -0,0 +1,5 @@
1
+ import { isInteger } from './isInteger.js';
2
+ /** Returns whether the payload is a negative Integer (but not 0) */
3
+ export function isNegativeInteger(payload) {
4
+ return isInteger(payload) && payload < 0;
5
+ }
@@ -0,0 +1,2 @@
1
+ /** Returns whether the payload is a positive Integer (but not 0) */
2
+ export declare function isPositiveInteger(payload: unknown): payload is number;
@@ -0,0 +1,5 @@
1
+ import { isInteger } from './isInteger.js';
2
+ /** Returns whether the payload is a positive Integer (but not 0) */
3
+ export function isPositiveInteger(payload) {
4
+ return isInteger(payload) && payload > 0;
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "is-what",
3
- "version": "5.3.0",
3
+ "version": "5.5.0",
4
4
  "description": "JS type check (TypeScript supported) functions like `isPlainObject() isArray()` etc. A simple & small integration.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -21,10 +21,10 @@
21
21
  "devDependencies": {
22
22
  "@cycraft/eslint": "^0.4.4",
23
23
  "@cycraft/tsconfig": "^0.1.2",
24
- "del-cli": "^6.0.0",
24
+ "del-cli": "^7.0.0",
25
25
  "np": "^10.2.0",
26
- "oxlint": "^1.11.2",
27
- "typedoc": "^0.28.10",
26
+ "oxlint": "^1.16.0",
27
+ "typedoc": "^0.28.13",
28
28
  "vitest": "^3.2.4"
29
29
  },
30
30
  "files": [