Initial Commit ...

This commit is contained in:
2026-04-17 16:22:31 +03:30
commit 2f271b21a2
65 changed files with 10616 additions and 0 deletions
@@ -0,0 +1,38 @@
import {
hasChild,
XKeyValue,
isNullOrUndefined,
isNullOrEmptyString,
} from 'x-framework-core';
/**
* Prepare a route by replacing it's params by providing values ...
*/
export function fillRouteParams(
route: string,
params?: Array<XKeyValue<string, string>>
) {
//
let result = '';
//
// Validate ...
if (isNullOrEmptyString(route)) {
return result;
}
//
// Check Params Has Child ...
if (!isNullOrUndefined(params) && hasChild(params)) {
//
result = route;
for (let param of params) {
//
const key = `{${param.key}}`;
result = result.replace(key, param.value);
}
}
//
return result;
}