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> ) { // 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; }