isModulePath checks if the given string is a module path.
(s string)
| 9 | |
| 10 | // isModulePath checks if the given string is a module path. |
| 11 | func 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. |
| 21 | func isHttpSepcifier(specifier string) bool { |
no outgoing calls
no test coverage detected