MCPcopy Create free account
hub / github.com/breck7/scroll / makeRelativePath

Method makeRelativePath

external/.scrollLibs.js:21965–21971  ·  view source on GitHub ↗
(importer, importee)

Source from the content-addressed store, hash-verified

21963 return await this.write(absolutePath, content)
21964 }
21965 makeRelativePath(importer, importee) {
21966 const folder = this.dirname(importer)
21967 let absoluteImportFilePath = this.join(folder, importee)
21968 if (isUrl(importee)) absoluteImportFilePath = importee
21969 else if (isUrl(folder)) absoluteImportFilePath = folder + "/" + importee
21970 return absoluteImportFilePath
21971 }
21972 static sortParsers(code) {
21973 return new parsersParser(code)._sortParticlesByInScopeOrder()._sortWithParentParsersUpTop()
21974 }

Callers

nothing calls this directly

Calls 3

dirnameMethod · 0.95
joinMethod · 0.95
isUrlFunction · 0.85

Tested by

no test coverage detected