MCPcopy Create free account
hub / github.com/observablehq/framework / isPathImport

Function isPathImport

src/path.ts:56–58  ·  view source on GitHub ↗
(specifier: string)

Source from the content-addressed store, hash-verified

54 * a global import from npm or a URL. Local paths start with ./, ../, or /.
55 */
56export function isPathImport(specifier: string): boolean {
57 return ["./", "../", "/"].some((prefix) => specifier.startsWith(prefix));
58}
59
60/**
61 * Like isPathImport, but more lax; this is used to detect when an HTML element

Callers 15

path-test.tsFile · 0.85
mockResolveImportFunction · 0.85
mockResolveFileFunction · 0.85
rewriteJsrImportsFunction · 0.85
resolveFunction · 0.85
resolveImportFunction · 0.85
getResolversFunction · 0.85
resolveImportFunction · 0.85
resolveStylesheetFunction · 0.85
getModuleResolverFunction · 0.85
getWatchFilesFunction · 0.85
addGlobalImportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected