es-toolkit 1.43.0-dev.1713 → 1.43.0-dev.1715
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.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +1 -0
- package/dist/predicate/index.d.mts +1 -0
- package/dist/predicate/index.d.ts +1 -0
- package/dist/predicate/index.js +2 -0
- package/dist/predicate/index.mjs +1 -0
- package/dist/predicate/isNumber.d.mts +25 -0
- package/dist/predicate/isNumber.d.ts +25 -0
- package/dist/predicate/isNumber.js +9 -0
- package/dist/predicate/isNumber.mjs +5 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -136,6 +136,7 @@ export { isNil } from './predicate/isNil.mjs';
|
|
|
136
136
|
export { isNode } from './predicate/isNode.mjs';
|
|
137
137
|
export { isNotNil } from './predicate/isNotNil.mjs';
|
|
138
138
|
export { isNull } from './predicate/isNull.mjs';
|
|
139
|
+
export { isNumber } from './predicate/isNumber.mjs';
|
|
139
140
|
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
140
141
|
export { isPrimitive } from './predicate/isPrimitive.mjs';
|
|
141
142
|
export { isPromise } from './predicate/isPromise.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -136,6 +136,7 @@ export { isNil } from './predicate/isNil.js';
|
|
|
136
136
|
export { isNode } from './predicate/isNode.js';
|
|
137
137
|
export { isNotNil } from './predicate/isNotNil.js';
|
|
138
138
|
export { isNull } from './predicate/isNull.js';
|
|
139
|
+
export { isNumber } from './predicate/isNumber.js';
|
|
139
140
|
export { isPlainObject } from './predicate/isPlainObject.js';
|
|
140
141
|
export { isPrimitive } from './predicate/isPrimitive.js';
|
|
141
142
|
export { isPromise } from './predicate/isPromise.js';
|
package/dist/index.js
CHANGED
|
@@ -140,6 +140,7 @@ const isNil = require('./predicate/isNil.js');
|
|
|
140
140
|
const isNode = require('./predicate/isNode.js');
|
|
141
141
|
const isNotNil = require('./predicate/isNotNil.js');
|
|
142
142
|
const isNull = require('./predicate/isNull.js');
|
|
143
|
+
const isNumber = require('./predicate/isNumber.js');
|
|
143
144
|
const isPlainObject = require('./predicate/isPlainObject.js');
|
|
144
145
|
const isPrimitive = require('./predicate/isPrimitive.js');
|
|
145
146
|
const isPromise = require('./predicate/isPromise.js');
|
|
@@ -323,6 +324,7 @@ exports.isNil = isNil.isNil;
|
|
|
323
324
|
exports.isNode = isNode.isNode;
|
|
324
325
|
exports.isNotNil = isNotNil.isNotNil;
|
|
325
326
|
exports.isNull = isNull.isNull;
|
|
327
|
+
exports.isNumber = isNumber.isNumber;
|
|
326
328
|
exports.isPlainObject = isPlainObject.isPlainObject;
|
|
327
329
|
exports.isPrimitive = isPrimitive.isPrimitive;
|
|
328
330
|
exports.isPromise = isPromise.isPromise;
|
package/dist/index.mjs
CHANGED
|
@@ -136,6 +136,7 @@ export { isNil } from './predicate/isNil.mjs';
|
|
|
136
136
|
export { isNode } from './predicate/isNode.mjs';
|
|
137
137
|
export { isNotNil } from './predicate/isNotNil.mjs';
|
|
138
138
|
export { isNull } from './predicate/isNull.mjs';
|
|
139
|
+
export { isNumber } from './predicate/isNumber.mjs';
|
|
139
140
|
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
140
141
|
export { isPrimitive } from './predicate/isPrimitive.mjs';
|
|
141
142
|
export { isPromise } from './predicate/isPromise.mjs';
|
|
@@ -17,6 +17,7 @@ export { isNil } from './isNil.mjs';
|
|
|
17
17
|
export { isNode } from './isNode.mjs';
|
|
18
18
|
export { isNotNil } from './isNotNil.mjs';
|
|
19
19
|
export { isNull } from './isNull.mjs';
|
|
20
|
+
export { isNumber } from './isNumber.mjs';
|
|
20
21
|
export { isPlainObject } from './isPlainObject.mjs';
|
|
21
22
|
export { isPrimitive } from './isPrimitive.mjs';
|
|
22
23
|
export { isPromise } from './isPromise.mjs';
|
|
@@ -17,6 +17,7 @@ export { isNil } from './isNil.js';
|
|
|
17
17
|
export { isNode } from './isNode.js';
|
|
18
18
|
export { isNotNil } from './isNotNil.js';
|
|
19
19
|
export { isNull } from './isNull.js';
|
|
20
|
+
export { isNumber } from './isNumber.js';
|
|
20
21
|
export { isPlainObject } from './isPlainObject.js';
|
|
21
22
|
export { isPrimitive } from './isPrimitive.js';
|
|
22
23
|
export { isPromise } from './isPromise.js';
|
package/dist/predicate/index.js
CHANGED
|
@@ -21,6 +21,7 @@ const isNil = require('./isNil.js');
|
|
|
21
21
|
const isNode = require('./isNode.js');
|
|
22
22
|
const isNotNil = require('./isNotNil.js');
|
|
23
23
|
const isNull = require('./isNull.js');
|
|
24
|
+
const isNumber = require('./isNumber.js');
|
|
24
25
|
const isPlainObject = require('./isPlainObject.js');
|
|
25
26
|
const isPrimitive = require('./isPrimitive.js');
|
|
26
27
|
const isPromise = require('./isPromise.js');
|
|
@@ -56,6 +57,7 @@ exports.isNil = isNil.isNil;
|
|
|
56
57
|
exports.isNode = isNode.isNode;
|
|
57
58
|
exports.isNotNil = isNotNil.isNotNil;
|
|
58
59
|
exports.isNull = isNull.isNull;
|
|
60
|
+
exports.isNumber = isNumber.isNumber;
|
|
59
61
|
exports.isPlainObject = isPlainObject.isPlainObject;
|
|
60
62
|
exports.isPrimitive = isPrimitive.isPrimitive;
|
|
61
63
|
exports.isPromise = isPromise.isPromise;
|
package/dist/predicate/index.mjs
CHANGED
|
@@ -17,6 +17,7 @@ export { isNil } from './isNil.mjs';
|
|
|
17
17
|
export { isNode } from './isNode.mjs';
|
|
18
18
|
export { isNotNil } from './isNotNil.mjs';
|
|
19
19
|
export { isNull } from './isNull.mjs';
|
|
20
|
+
export { isNumber } from './isNumber.mjs';
|
|
20
21
|
export { isPlainObject } from './isPlainObject.mjs';
|
|
21
22
|
export { isPrimitive } from './isPrimitive.mjs';
|
|
22
23
|
export { isPromise } from './isPromise.mjs';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the given value is a number.
|
|
3
|
+
*
|
|
4
|
+
* This function tests whether the provided value is strictly a `number`.
|
|
5
|
+
* It returns `true` if the value is a `number`, and `false` otherwise.
|
|
6
|
+
*
|
|
7
|
+
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `number`.
|
|
8
|
+
*
|
|
9
|
+
* @param {unknown} x - The value to test if it is a number.
|
|
10
|
+
* @returns {x is number} True if the value is a number, false otherwise.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* const value1 = 123;
|
|
15
|
+
* const value2 = 'abc';
|
|
16
|
+
* const value3 = true;
|
|
17
|
+
*
|
|
18
|
+
* console.log(isNumber(value1)); // true
|
|
19
|
+
* console.log(isNumber(value2)); // false
|
|
20
|
+
* console.log(isNumber(value3)); // false
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
declare function isNumber(x: unknown): x is number;
|
|
24
|
+
|
|
25
|
+
export { isNumber };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the given value is a number.
|
|
3
|
+
*
|
|
4
|
+
* This function tests whether the provided value is strictly a `number`.
|
|
5
|
+
* It returns `true` if the value is a `number`, and `false` otherwise.
|
|
6
|
+
*
|
|
7
|
+
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `number`.
|
|
8
|
+
*
|
|
9
|
+
* @param {unknown} x - The value to test if it is a number.
|
|
10
|
+
* @returns {x is number} True if the value is a number, false otherwise.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* const value1 = 123;
|
|
15
|
+
* const value2 = 'abc';
|
|
16
|
+
* const value3 = true;
|
|
17
|
+
*
|
|
18
|
+
* console.log(isNumber(value1)); // true
|
|
19
|
+
* console.log(isNumber(value2)); // false
|
|
20
|
+
* console.log(isNumber(value3)); // false
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
declare function isNumber(x: unknown): x is number;
|
|
24
|
+
|
|
25
|
+
export { isNumber };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
|
-
"version": "1.43.0-dev.
|
|
3
|
+
"version": "1.43.0-dev.1715+9686e517",
|
|
4
4
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
5
5
|
"homepage": "https://es-toolkit.dev",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|