@twin.org/core 0.0.2-next.17 → 0.0.2-next.18

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.
@@ -400,7 +400,7 @@ class StringHelper {
400
400
  /**
401
401
  * Implementation signature for trimTrailingSlashes.
402
402
  * @param value The value to trim.
403
- * @returns The trimmed string or the original null/undefined.
403
+ * @returns The trimmed string or the original.
404
404
  */
405
405
  static trimTrailingSlashes(value) {
406
406
  if (Is.string(value)) {
@@ -411,7 +411,7 @@ class StringHelper {
411
411
  /**
412
412
  * Implementation signature for trimLeadingSlashes.
413
413
  * @param value The value to trim.
414
- * @returns The trimmed string or the original null/undefined.
414
+ * @returns The trimmed string or the original.
415
415
  */
416
416
  static trimLeadingSlashes(value) {
417
417
  if (Is.string(value)) {
@@ -398,7 +398,7 @@ class StringHelper {
398
398
  /**
399
399
  * Implementation signature for trimTrailingSlashes.
400
400
  * @param value The value to trim.
401
- * @returns The trimmed string or the original null/undefined.
401
+ * @returns The trimmed string or the original.
402
402
  */
403
403
  static trimTrailingSlashes(value) {
404
404
  if (Is.string(value)) {
@@ -409,7 +409,7 @@ class StringHelper {
409
409
  /**
410
410
  * Implementation signature for trimLeadingSlashes.
411
411
  * @param value The value to trim.
412
- * @returns The trimmed string or the original null/undefined.
412
+ * @returns The trimmed string or the original.
413
413
  */
414
414
  static trimLeadingSlashes(value) {
415
415
  if (Is.string(value)) {
@@ -3,29 +3,17 @@
3
3
  */
4
4
  export declare class StringHelper {
5
5
  /**
6
- * Trim trailing slashes from a string.
7
- * Overloads preserve null/undefined instead of coercing to empty string.
6
+ * Implementation signature for trimTrailingSlashes.
8
7
  * @param value The value to trim.
9
- * @returns The trimmed value (same null/undefined passed in).
8
+ * @returns The trimmed string or the original.
10
9
  */
11
10
  static trimTrailingSlashes(value: string): string;
12
11
  /**
13
- *
14
- * @param value
15
- */
16
- static trimTrailingSlashes<T extends null | undefined>(value: T): T;
17
- /**
18
- * Trim leading slashes from a string.
19
- * Overloads preserve null/undefined instead of coercing to empty string.
12
+ * Implementation signature for trimLeadingSlashes.
20
13
  * @param value The value to trim.
21
- * @returns The trimmed value (same null/undefined passed in).
14
+ * @returns The trimmed string or the original.
22
15
  */
23
16
  static trimLeadingSlashes(value: string): string;
24
- /**
25
- * Overload for null/undefined passthrough.
26
- * @param value The null or undefined value.
27
- */
28
- static trimLeadingSlashes<T extends null | undefined>(value: T): T;
29
17
  /**
30
18
  * Convert the input string to kebab case.
31
19
  * @param input The input to convert.
package/docs/changelog.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @twin.org/core - Changelog
2
2
 
3
+ ## [0.0.2-next.18](https://github.com/twinfoundation/framework/compare/core-v0.0.2-next.17...core-v0.0.2-next.18) (2025-09-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * simplify StringHelper signature ([0390403](https://github.com/twinfoundation/framework/commit/039040344952f91ee3c671249bc0e1c8f3b38e17))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/nameof bumped from 0.0.2-next.17 to 0.0.2-next.18
16
+ * devDependencies
17
+ * @twin.org/nameof-transformer bumped from 0.0.2-next.17 to 0.0.2-next.18
18
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.17 to 0.0.2-next.18
19
+
3
20
  ## [0.0.2-next.17](https://github.com/twinfoundation/framework/compare/core-v0.0.2-next.16...core-v0.0.2-next.17) (2025-09-29)
4
21
 
5
22
 
@@ -16,107 +16,45 @@ Class to help with string.
16
16
 
17
17
  ### trimTrailingSlashes()
18
18
 
19
- Implementation signature for trimTrailingSlashes.
20
-
21
- #### Param
22
-
23
- The value to trim.
24
-
25
- #### Call Signature
26
-
27
19
  > `static` **trimTrailingSlashes**(`value`): `string`
28
20
 
29
- Trim trailing slashes from a string.
30
- Overloads preserve null/undefined instead of coercing to empty string.
21
+ Implementation signature for trimTrailingSlashes.
31
22
 
32
- ##### Parameters
23
+ #### Parameters
33
24
 
34
- ###### value
25
+ ##### value
35
26
 
36
27
  `string`
37
28
 
38
29
  The value to trim.
39
30
 
40
- ##### Returns
31
+ #### Returns
41
32
 
42
33
  `string`
43
34
 
44
- The trimmed value (same null/undefined passed in).
45
-
46
- #### Call Signature
47
-
48
- > `static` **trimTrailingSlashes**\<`T`\>(`value`): `T`
49
-
50
- ##### Type Parameters
51
-
52
- ###### T
53
-
54
- `T` *extends* `undefined` \| `null`
55
-
56
- ##### Parameters
57
-
58
- ###### value
59
-
60
- `T`
61
-
62
- ##### Returns
63
-
64
- `T`
35
+ The trimmed string or the original.
65
36
 
66
37
  ***
67
38
 
68
39
  ### trimLeadingSlashes()
69
40
 
70
- Implementation signature for trimLeadingSlashes.
71
-
72
- #### Param
73
-
74
- The value to trim.
75
-
76
- #### Call Signature
77
-
78
41
  > `static` **trimLeadingSlashes**(`value`): `string`
79
42
 
80
- Trim leading slashes from a string.
81
- Overloads preserve null/undefined instead of coercing to empty string.
43
+ Implementation signature for trimLeadingSlashes.
82
44
 
83
- ##### Parameters
45
+ #### Parameters
84
46
 
85
- ###### value
47
+ ##### value
86
48
 
87
49
  `string`
88
50
 
89
51
  The value to trim.
90
52
 
91
- ##### Returns
53
+ #### Returns
92
54
 
93
55
  `string`
94
56
 
95
- The trimmed value (same null/undefined passed in).
96
-
97
- #### Call Signature
98
-
99
- > `static` **trimLeadingSlashes**\<`T`\>(`value`): `T`
100
-
101
- Overload for null/undefined passthrough.
102
-
103
- ##### Type Parameters
104
-
105
- ###### T
106
-
107
- `T` *extends* `undefined` \| `null`
108
-
109
- ##### Parameters
110
-
111
- ###### value
112
-
113
- `T`
114
-
115
- The null or undefined value.
116
-
117
- ##### Returns
118
-
119
- `T`
57
+ The trimmed string or the original.
120
58
 
121
59
  ***
122
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/core",
3
- "version": "0.0.2-next.17",
3
+ "version": "0.0.2-next.18",
4
4
  "description": "Helper methods/classes for data type checking/validation/guarding/error handling",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,7 +14,7 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/nameof": "0.0.2-next.17",
17
+ "@twin.org/nameof": "0.0.2-next.18",
18
18
  "intl-messageformat": "10.7.16",
19
19
  "rfc6902": "5.1.2"
20
20
  },