MCPcopy Create free account
hub / github.com/esm-dev/esm.sh / isModulePath

Function isModulePath

web/utils.go:11–18  ·  view source on GitHub ↗

isModulePath checks if the given string is a module path.

(s string)

Source from the content-addressed store, hash-verified

9
10// isModulePath checks if the given string is a module path.
11func isModulePath(s string) bool {
12 switch path.Ext(s) {
13 case ".js", ".mjs", ".jsx", ".ts", ".mts", ".tsx", ".svelte", ".vue":
14 return true
15 default:
16 return false
17 }
18}
19
20// isHttpSepcifier returns true if the specifier is a remote URL.
21func isHttpSepcifier(specifier string) bool {

Callers 3

ServeFrameworkCSSMethod · 0.85
analyzeDependencyTreeMethod · 0.85
preloadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected