MCPcopy
hub / github.com/esm-dev/esm.sh / PackageId

Method PackageId

server/path.go:37–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37func (p EsmPath) PackageId() string {
38 id := p.PkgName
39 if p.PkgVersion != "" && p.PkgVersion != "*" && p.PkgVersion != "latest" {
40 id += "@" + strings.ReplaceAll(p.PkgVersion, " ", "%20")
41 }
42 if p.GhPrefix {
43 return "gh/" + id
44 }
45 if p.PrPrefix {
46 return "pr/" + id
47 }
48 return id
49}
50
51func (p EsmPath) String() string {
52 if p.SubPath != "" {

Callers 12

StringMethod · 0.95
resolveExternalModuleMethod · 0.95
esmRouterFunction · 0.80
getCSSEntryRedirectURLFunction · 0.80
cjsModuleLexerFunction · 0.80
buildPathMethod · 0.80
buildModuleMethod · 0.80
buildTypesMethod · 0.80
installMethod · 0.80
resolveDTSMethod · 0.80
getImportPathMethod · 0.80
transformDTSFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected