MCPcopy
hub / github.com/rollup/rollup / join

Function join

browser/src/path.ts:38–45  ·  view source on GitHub ↗
(...segments: string[])

Source from the content-addressed store, hash-verified

36}
37
38export function join(...segments: string[]): string {
39 const joined = segments.join('/');
40 const absolute = ANY_SLASH_REGEX.test(joined[0]);
41 return (
42 (absolute ? '/' : '') +
43 (normalizePathSegments(joined.split(ANY_SLASH_REGEX), absolute) || (absolute ? '' : '.'))
44 );
45}
46
47function normalizePathSegments(parts: string[], absolute = false): string {
48 const normalized: string[] = [];

Callers 15

resolveIdFunction · 0.85
resolveIdFunction · 0.85
resultFunction · 0.85
es.jsFile · 0.85
system.jsFile · 0.85
requireMakeBuiltInFunction · 0.85
constructFunction · 0.85
requireEs_string_rawFunction · 0.85

Calls 2

normalizePathSegmentsFunction · 0.85
testMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…