MCPcopy
hub / github.com/QwikDev/qwik / join

Function join

packages/qwik/src/optimizer/src/path.ts:201–221  ·  view source on GitHub ↗
(...paths: string[])

Source from the content-addressed store, hash-verified

199 };
200
201 const join = function join(...paths: string[]) {
202 if (paths.length === 0) {
203 return '.';
204 }
205 let joined;
206 for (let i = 0; i < paths.length; ++i) {
207 const arg = paths[i];
208 assertPath(arg);
209 if (arg.length > 0) {
210 if (joined === undefined) {
211 joined = arg;
212 } else {
213 joined += '/' + arg;
214 }
215 }
216 }
217 if (joined === undefined) {
218 return '.';
219 }
220 return normalize(joined);
221 };
222
223 const relative = function relative(from: string, to: string) {
224 assertPath(from);

Callers 15

qwik.unit.tsFile · 0.90
visitNotIgnoredFilesFunction · 0.90
runNewCommandFunction · 0.90
writeToFileFunction · 0.90
updateViteConfigsFunction · 0.90
createFakeFilesFunction · 0.90
createQwikCityFunction · 0.90
openStaticFileFunction · 0.90
tscQwikFunction · 0.90
tscQwikCityFunction · 0.90
tscDocsFunction · 0.90

Calls 2

assertPathFunction · 0.85
normalizeFunction · 0.85

Tested by 1

expectHtmlOnARootPageFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…