fiberx-backend-toolkit 0.0.75 → 0.0.76
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.
|
@@ -113,5 +113,6 @@ declare class InputTransformerUtil {
|
|
|
113
113
|
static formatLinksObject(links: Record<string, string>): Record<string, string>;
|
|
114
114
|
static buildNestedObject(paths: string[]): any;
|
|
115
115
|
static minifyHtml(html: string): string;
|
|
116
|
+
static joinStringsBy(parts: string | string[], separator: string): string;
|
|
116
117
|
}
|
|
117
118
|
export default InputTransformerUtil;
|
|
@@ -349,5 +349,13 @@ class InputTransformerUtil {
|
|
|
349
349
|
});
|
|
350
350
|
return html;
|
|
351
351
|
}
|
|
352
|
+
// Method to join strings by
|
|
353
|
+
static joinStringsBy(parts, separator) {
|
|
354
|
+
// Ensure parts is always a flat array of strings
|
|
355
|
+
const flat_parts = Array.isArray(parts) ? parts : [parts];
|
|
356
|
+
// Filter out empty/null/undefined strings to avoid extra separators
|
|
357
|
+
const valid_parts = flat_parts.filter(part => part !== null && part !== undefined && part !== "");
|
|
358
|
+
return valid_parts.join(separator);
|
|
359
|
+
}
|
|
352
360
|
}
|
|
353
361
|
exports.default = InputTransformerUtil;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fiberx-backend-toolkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.76",
|
|
4
4
|
"description": "A TypeScript backend toolkit providing shared domain logic, infrastructure helpers, and utilities for FiberX server-side applications and services.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/index.js",
|