nhb-toolbox 4.28.4 → 4.28.6
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/CHANGELOG.md +5 -1
- package/dist/dts/string/types.d.ts +20 -2
- package/dist/dts/utils/index.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@ All notable changes to the package will be documented here.
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [4.28.6] - 2025-12-02
|
|
10
|
+
|
|
11
|
+
- **Updated** *tsdoc* for `stableStringify` + *type augmentation* for `String` methods: `toLowerCase` and `toUpperCase`
|
|
12
|
+
|
|
9
13
|
## [4.28.4] - 2025-12-02
|
|
10
14
|
|
|
11
15
|
- **Updated** *implementation* and *tsdoc* for:
|
|
@@ -32,7 +36,7 @@ All notable changes to the package will be documented here.
|
|
|
32
36
|
|
|
33
37
|
## [4.27.10] - 2025-11-28
|
|
34
38
|
|
|
35
|
-
- **Updated** type augmentation for `String` methods: `toLowerCase` and `toUpperCase` (type level only, implementation remains intact).
|
|
39
|
+
- **Updated** *type augmentation* for `String` methods: `toLowerCase` and `toUpperCase` (type level only, implementation remains intact).
|
|
36
40
|
|
|
37
41
|
## [4.27.1] - 2025-11-28
|
|
38
42
|
|
|
@@ -4,9 +4,27 @@ import type { LOWERCASE } from './constants';
|
|
|
4
4
|
declare global {
|
|
5
5
|
interface String {
|
|
6
6
|
toLowerCase(): string;
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* * Converts all the alphabetic characters in a string to lowercase.
|
|
9
|
+
*
|
|
10
|
+
* @typeParam `Lower` - A type-level flag. If `'T'`, returns the lowercase string type (`Lowercase<string>`). Otherwise, returns literal `Lower` (must be Lowercase type).
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* - This augmentation only affects TypeScript type inference.
|
|
14
|
+
* - Runtime behavior remains identical to the standard `toLowerCase()` method.
|
|
15
|
+
*/
|
|
16
|
+
toLowerCase<Lower extends 'T' | Lowercase<string>>(): Lower extends 'T' ? Lowercase<string> : Lower;
|
|
8
17
|
toUpperCase(): string;
|
|
9
|
-
|
|
18
|
+
/**
|
|
19
|
+
* * Converts all the alphabetic characters in a string to uppercase.
|
|
20
|
+
*
|
|
21
|
+
* @typeParam `Upper` - A type-level flag. If `'T'`, returns the uppercase string type (`Uppercase<string>`). Otherwise, returns literal `Upper` (must be Uppercase type).
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* - This augmentation only affects TypeScript type inference.
|
|
25
|
+
* - Runtime behavior remains identical to the standard `toUpperCase()` method.
|
|
26
|
+
*/
|
|
27
|
+
toUpperCase<Upper extends 'T' | Uppercase<string>>(): Upper extends 'T' ? Uppercase<string> : Upper;
|
|
10
28
|
}
|
|
11
29
|
}
|
|
12
30
|
/** - Options for generating anagrams. */
|
|
@@ -122,7 +122,7 @@ export declare function getStaticGetterNames(cls: Constructor): string[];
|
|
|
122
122
|
export declare function getClassDetails(cls: Constructor): ClassDetails;
|
|
123
123
|
/**
|
|
124
124
|
* * Create a deterministic JSON string representation of any value.
|
|
125
|
-
*
|
|
125
|
+
* - The output format matches standard JSON but with guaranteed sorted keys.
|
|
126
126
|
*
|
|
127
127
|
*
|
|
128
128
|
* @remarks
|
|
@@ -131,7 +131,7 @@ export declare function getClassDetails(cls: Constructor): ClassDetails;
|
|
|
131
131
|
* - Recursively stabilizing nested objects and arrays.
|
|
132
132
|
* - Converting all `undefined` values into `null` so the output remains valid JSON.
|
|
133
133
|
* - Converting date-like objects (`Date`, `Chronos`, `Moment.js`, `Day.js`, `Luxon`, `JS-Joda`, `Temporal`) **in the same way that {@link JSON.stringify} would serialize them**, ensuring predictable and JSON-compliant output.
|
|
134
|
-
*
|
|
134
|
+
* - Falling back to native JSON serialization for primitives.
|
|
135
135
|
*
|
|
136
136
|
* - **Useful for:**
|
|
137
137
|
* - Hash generation (e.g., signatures, cache keys)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nhb-toolbox",
|
|
3
|
-
"version": "4.28.
|
|
3
|
+
"version": "4.28.6",
|
|
4
4
|
"description": "A versatile collection of smart, efficient, and reusable utility functions, classes and types for everyday development needs.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|