MCPcopy
hub / github.com/YMFE/yapi / handlePath

Function handlePath

exts/yapi-plugin-import-har/client.js:77–88  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

75 }
76
77 function handlePath(path) {
78 path = parseUrl(path).pathname;
79 path = decodeURIComponent(path);
80 if (!path) return '';
81
82 path = path.replace(/{{\w*}}/g, '');
83
84 if (path[0] != '/') {
85 path = '/' + path;
86 }
87 return path;
88 }
89
90 function run(res) {
91 try {

Callers 2

AddProject.jsFile · 0.50

Calls 1

parseUrlFunction · 0.70

Tested by

no test coverage detected