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

Method AddImport

internal/importmap/importmap.go:305–307  ·  view source on GitHub ↗

AddImport adds an import to the import map.

(imp ImportMeta, noSRI bool)

Source from the content-addressed store, hash-verified

303
304// AddImport adds an import to the import map.
305func (im *ImportMap) AddImport(imp ImportMeta, noSRI bool) (warnings []string, errors []error) {
306 return im.addImport(set.New[string](), imp, false, nil, noSRI)
307}
308
309// addImport adds an import to the import map.
310func (im *ImportMap) addImport(mark *set.Set[string], imp ImportMeta, indirect bool, targetImports *Imports, noSRI bool) (warnings []string, errors []error) {

Callers 2

addImportsFunction · 0.80

Calls 1

addImportMethod · 0.95

Tested by

no test coverage detected