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

Method cdnOrigin

internal/importmap/importmap.go:468–474  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

466}
467
468func (im *ImportMap) cdnOrigin() string {
469 cdn := im.config.CDN
470 if strings.HasPrefix(cdn, "https://") || strings.HasPrefix(cdn, "http://") {
471 return cdn
472 }
473 return "https://esm.sh"
474}
475
476// MarshalJSON implements the json.Marshaler interface.
477func (im *ImportMap) MarshalJSON() ([]byte, error) {

Callers 3

ParseImportMethod · 0.95
FetchImportMetaMethod · 0.95
addImportMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected