MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / buildRoutePath

Function buildRoutePath

out/cli.cjs:77431–77440  ·  view source on GitHub ↗
(routePath, pathParameters, options = {})

Source from the content-addressed store, hash-verified

77429 let value = param.toISOString !== void 0 ? param.toISOString() : String(param);
77430 if (!options.skipUrlEncoding) {
77431 value = encodeURIComponent(param);
77432 }
77433 endpoint = (_a5 = replaceAll(endpoint, `{${key}}`, value)) !== null && _a5 !== void 0 ? _a5 : "";
77434 }
77435 return endpoint;
77436}
77437function buildRoutePath(routePath, pathParameters, options = {}) {
77438 for (const pathParam of pathParameters) {
77439 let value = pathParam;
77440 if (!options.skipUrlEncoding) {
77441 value = encodeURIComponent(pathParam);
77442 }
77443 routePath = routePath.replace(/\{\w+\}/, value);

Callers 1

buildRequestUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected