es-toolkit 1.43.0-dev.1713 → 1.43.0-dev.1714
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
|
@@ -135,6 +135,7 @@ export { isMap } from './predicate/isMap.mjs';
|
|
|
135
135
|
export { isNil } from './predicate/isNil.mjs';
|
|
136
136
|
export { isNode } from './predicate/isNode.mjs';
|
|
137
137
|
export { isNotNil } from './predicate/isNotNil.mjs';
|
|
138
|
+
export { isNumber } from './predicate/isNumber.mjs';
|
|
138
139
|
export { isNull } from './predicate/isNull.mjs';
|
|
139
140
|
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
140
141
|
export { isPrimitive } from './predicate/isPrimitive.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -135,6 +135,7 @@ export { isMap } from './predicate/isMap.js';
|
|
|
135
135
|
export { isNil } from './predicate/isNil.js';
|
|
136
136
|
export { isNode } from './predicate/isNode.js';
|
|
137
137
|
export { isNotNil } from './predicate/isNotNil.js';
|
|
138
|
+
export { isNumber } from './predicate/isNumber.js';
|
|
138
139
|
export { isNull } from './predicate/isNull.js';
|
|
139
140
|
export { isPlainObject } from './predicate/isPlainObject.js';
|
|
140
141
|
export { isPrimitive } from './predicate/isPrimitive.js';
|
package/dist/index.js
CHANGED
|
@@ -139,6 +139,7 @@ const isMap = require('./predicate/isMap.js');
|
|
|
139
139
|
const isNil = require('./predicate/isNil.js');
|
|
140
140
|
const isNode = require('./predicate/isNode.js');
|
|
141
141
|
const isNotNil = require('./predicate/isNotNil.js');
|
|
142
|
+
const isNumber = require('./predicate/isNumber.js');
|
|
142
143
|
const isNull = require('./predicate/isNull.js');
|
|
143
144
|
const isPlainObject = require('./predicate/isPlainObject.js');
|
|
144
145
|
const isPrimitive = require('./predicate/isPrimitive.js');
|
|
@@ -322,6 +323,7 @@ exports.isMap = isMap.isMap;
|
|
|
322
323
|
exports.isNil = isNil.isNil;
|
|
323
324
|
exports.isNode = isNode.isNode;
|
|
324
325
|
exports.isNotNil = isNotNil.isNotNil;
|
|
326
|
+
exports.isNumber = isNumber.isNumber;
|
|
325
327
|
exports.isNull = isNull.isNull;
|
|
326
328
|
exports.isPlainObject = isPlainObject.isPlainObject;
|
|
327
329
|
exports.isPrimitive = isPrimitive.isPrimitive;
|
package/dist/index.mjs
CHANGED
|
@@ -135,6 +135,7 @@ export { isMap } from './predicate/isMap.mjs';
|
|
|
135
135
|
export { isNil } from './predicate/isNil.mjs';
|
|
136
136
|
export { isNode } from './predicate/isNode.mjs';
|
|
137
137
|
export { isNotNil } from './predicate/isNotNil.mjs';
|
|
138
|
+
export { isNumber } from './predicate/isNumber.mjs';
|
|
138
139
|
export { isNull } from './predicate/isNull.mjs';
|
|
139
140
|
export { isPlainObject } from './predicate/isPlainObject.mjs';
|
|
140
141
|
export { isPrimitive } from './predicate/isPrimitive.mjs';
|
|
@@ -16,6 +16,7 @@ export { isMap } from './isMap.mjs';
|
|
|
16
16
|
export { isNil } from './isNil.mjs';
|
|
17
17
|
export { isNode } from './isNode.mjs';
|
|
18
18
|
export { isNotNil } from './isNotNil.mjs';
|
|
19
|
+
export { isNumber } from './isNumber.mjs';
|
|
19
20
|
export { isNull } from './isNull.mjs';
|
|
20
21
|
export { isPlainObject } from './isPlainObject.mjs';
|
|
21
22
|
export { isPrimitive } from './isPrimitive.mjs';
|
|
@@ -16,6 +16,7 @@ export { isMap } from './isMap.js';
|
|
|
16
16
|
export { isNil } from './isNil.js';
|
|
17
17
|
export { isNode } from './isNode.js';
|
|
18
18
|
export { isNotNil } from './isNotNil.js';
|
|
19
|
+
export { isNumber } from './isNumber.js';
|
|
19
20
|
export { isNull } from './isNull.js';
|
|
20
21
|
export { isPlainObject } from './isPlainObject.js';
|
|
21
22
|
export { isPrimitive } from './isPrimitive.js';
|
package/dist/predicate/index.js
CHANGED
|
@@ -20,6 +20,7 @@ const isMap = require('./isMap.js');
|
|
|
20
20
|
const isNil = require('./isNil.js');
|
|
21
21
|
const isNode = require('./isNode.js');
|
|
22
22
|
const isNotNil = require('./isNotNil.js');
|
|
23
|
+
const isNumber = require('./isNumber.js');
|
|
23
24
|
const isNull = require('./isNull.js');
|
|
24
25
|
const isPlainObject = require('./isPlainObject.js');
|
|
25
26
|
const isPrimitive = require('./isPrimitive.js');
|
|
@@ -55,6 +56,7 @@ exports.isMap = isMap.isMap;
|
|
|
55
56
|
exports.isNil = isNil.isNil;
|
|
56
57
|
exports.isNode = isNode.isNode;
|
|
57
58
|
exports.isNotNil = isNotNil.isNotNil;
|
|
59
|
+
exports.isNumber = isNumber.isNumber;
|
|
58
60
|
exports.isNull = isNull.isNull;
|
|
59
61
|
exports.isPlainObject = isPlainObject.isPlainObject;
|
|
60
62
|
exports.isPrimitive = isPrimitive.isPrimitive;
|
package/dist/predicate/index.mjs
CHANGED
|
@@ -16,6 +16,7 @@ export { isMap } from './isMap.mjs';
|
|
|
16
16
|
export { isNil } from './isNil.mjs';
|
|
17
17
|
export { isNode } from './isNode.mjs';
|
|
18
18
|
export { isNotNil } from './isNotNil.mjs';
|
|
19
|
+
export { isNumber } from './isNumber.mjs';
|
|
19
20
|
export { isNull } from './isNull.mjs';
|
|
20
21
|
export { isPlainObject } from './isPlainObject.mjs';
|
|
21
22
|
export { isPrimitive } from './isPrimitive.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.1714+ca860153",
|
|
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",
|