MCPcopy
hub / github.com/expo/expo / join

Function join

packages/expo-file-system/src/pathUtilities/path.ts:158–172  ·  view source on GitHub ↗
(...args: string[])

Source from the content-addressed store, hash-verified

156 return path.length > 0 && path.charAt(0) === '/';
157}
158export function join(...args: string[]) {
159 if (args.length === 0) return '.';
160
161 const path: string[] = [];
162 for (let i = 0; i < args.length; ++i) {
163 const arg = args[i];
164 if (arg && arg.length > 0) {
165 path.push(arg);
166 }
167 }
168
169 if (path.length === 0) return '.';
170
171 return normalize(path.join('/'));
172}
173export function relative(from: string, to: string) {
174 if (from === to) return '';
175

Callers 15

initAsyncMethod · 0.90
logFilesAsyncMethod · 0.90
getDiffAsyncMethod · 0.90
writeContentsJsonAsyncFunction · 0.90
ensureCacheDirectoryFunction · 0.90
clearUnusedCachesAsyncFunction · 0.90
temporaryDirectoryFunction · 0.90
watch-bundle.mjsFile · 0.90
build-bundle.mjsFile · 0.90
getRootPackageJsonPathFunction · 0.90

Calls 3

joinMethod · 0.80
normalizeFunction · 0.70
pushMethod · 0.45

Tested by 4

temporaryDirectoryFunction · 0.72
tempDirectoryFunction · 0.72
projectPathFunction · 0.72
getTestFilePathsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…