es-toolkit 1.18.0-dev.588 → 1.18.0-dev.589

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.
@@ -152,6 +152,7 @@ export { isWeakMap } from './predicate/isWeakMap.mjs';
152
152
  export { isWeakSet } from './predicate/isWeakSet.mjs';
153
153
  export { conforms } from './predicate/conforms.mjs';
154
154
  export { conformsTo } from './predicate/conformsTo.mjs';
155
+ export { isInteger } from './predicate/isInteger.mjs';
155
156
  export { camelCase } from './string/camelCase.mjs';
156
157
  export { kebabCase } from './string/kebabCase.mjs';
157
158
  export { snakeCase } from './string/snakeCase.mjs';
@@ -152,6 +152,7 @@ export { isWeakMap } from './predicate/isWeakMap.js';
152
152
  export { isWeakSet } from './predicate/isWeakSet.js';
153
153
  export { conforms } from './predicate/conforms.js';
154
154
  export { conformsTo } from './predicate/conformsTo.js';
155
+ export { isInteger } from './predicate/isInteger.js';
155
156
  export { camelCase } from './string/camelCase.js';
156
157
  export { kebabCase } from './string/kebabCase.js';
157
158
  export { snakeCase } from './string/snakeCase.js';
@@ -1028,6 +1028,10 @@ function conforms(source) {
1028
1028
  };
1029
1029
  }
1030
1030
 
1031
+ function isInteger(value) {
1032
+ return Number.isInteger(value);
1033
+ }
1034
+
1031
1035
  function normalizeForCase(str) {
1032
1036
  if (typeof str === 'object') {
1033
1037
  str = str.toString();
@@ -1349,6 +1353,7 @@ exports.isArguments = isArguments;
1349
1353
  exports.isArray = isArray;
1350
1354
  exports.isArrayLike = isArrayLike;
1351
1355
  exports.isBoolean = isBoolean;
1356
+ exports.isInteger = isInteger;
1352
1357
  exports.isMatch = isMatch;
1353
1358
  exports.isObject = isObject;
1354
1359
  exports.isPlainObject = isPlainObject;
@@ -152,6 +152,7 @@ export { isWeakMap } from './predicate/isWeakMap.mjs';
152
152
  export { isWeakSet } from './predicate/isWeakSet.mjs';
153
153
  export { conforms } from './predicate/conforms.mjs';
154
154
  export { conformsTo } from './predicate/conformsTo.mjs';
155
+ export { isInteger } from './predicate/isInteger.mjs';
155
156
  export { camelCase } from './string/camelCase.mjs';
156
157
  export { kebabCase } from './string/kebabCase.mjs';
157
158
  export { snakeCase } from './string/snakeCase.mjs';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Checks if `value` is an integer.
3
+ *
4
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `number`.
5
+ *
6
+ * @param {unknown} value - The value to check
7
+ * @returns {boolean} `true` if `value` is integer, otherwise `false`.
8
+ *
9
+ * @example
10
+ * isInteger(3); // Returns: true
11
+ * isInteger(Infinity); // Returns: false
12
+ * isInteger('3'); // Returns: false
13
+ * isInteger([]); // Returns: false
14
+ */
15
+ declare function isInteger(value?: unknown): value is number;
16
+
17
+ export { isInteger };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Checks if `value` is an integer.
3
+ *
4
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `number`.
5
+ *
6
+ * @param {unknown} value - The value to check
7
+ * @returns {boolean} `true` if `value` is integer, otherwise `false`.
8
+ *
9
+ * @example
10
+ * isInteger(3); // Returns: true
11
+ * isInteger(Infinity); // Returns: false
12
+ * isInteger('3'); // Returns: false
13
+ * isInteger([]); // Returns: false
14
+ */
15
+ declare function isInteger(value?: unknown): value is number;
16
+
17
+ export { isInteger };
@@ -0,0 +1,5 @@
1
+ function isInteger(value) {
2
+ return Number.isInteger(value);
3
+ }
4
+
5
+ export { isInteger };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "es-toolkit",
3
3
  "description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
4
- "version": "1.18.0-dev.588+93643907",
4
+ "version": "1.18.0-dev.589+ff8976e5",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {