@simplysm/core-common 13.0.83 → 13.0.84
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/utils/num.d.ts +1 -1
- package/package.json +1 -1
- package/src/utils/num.ts +1 -1
- package/src/utils/transferable.ts +1 -1
package/dist/utils/num.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @note Strings with decimal points return only the integer part (e.g., '12.34' → 12).
|
|
9
9
|
* Use {@link parseRoundedInt} if rounding is needed.
|
|
10
10
|
* @note Hyphens (-) in the middle of the string are preserved, which may result in unintended negative numbers.
|
|
11
|
-
* Example: `"
|
|
11
|
+
* Example: `"A-123B"` → `-123`
|
|
12
12
|
*/
|
|
13
13
|
export declare function parseInt(text: unknown): number | undefined;
|
|
14
14
|
/**
|
package/package.json
CHANGED
package/src/utils/num.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @note Strings with decimal points return only the integer part (e.g., '12.34' → 12).
|
|
12
12
|
* Use {@link parseRoundedInt} if rounding is needed.
|
|
13
13
|
* @note Hyphens (-) in the middle of the string are preserved, which may result in unintended negative numbers.
|
|
14
|
-
* Example: `"
|
|
14
|
+
* Example: `"A-123B"` → `-123`
|
|
15
15
|
*/
|
|
16
16
|
export function parseInt(text: unknown): number | undefined {
|
|
17
17
|
if (typeof text === "number") return Math.trunc(text);
|
|
@@ -63,7 +63,7 @@ function encodeImpl(
|
|
|
63
63
|
): unknown {
|
|
64
64
|
if (obj == null) return obj;
|
|
65
65
|
|
|
66
|
-
//
|
|
66
|
+
// Object type processing: circular reference detection + cache
|
|
67
67
|
if (typeof obj === "object") {
|
|
68
68
|
// Circular reference detection (object in current recursion stack)
|
|
69
69
|
if (ancestors.has(obj)) {
|