MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isJsPathSpecifier

Function isJsPathSpecifier

src/resolution/import-resolver.ts:2943–2946  ·  view source on GitHub ↗

* A module specifier written as a path — relative (`./x`, `../x`), rooted, or * an alias with a folder in it (`@/lib/x`, `~/x`, `$lib/x`) — or a scoped * package (`@excalidraw/common`), which no binding can be named and which a * `tsconfig` path or a workspace member can map to a project file; ra

(name: string)

Source from the content-addressed store, hash-verified

2941 * than an imported binding's name or a bare package (`react`, `lodash`).
2942 */
2943function isJsPathSpecifier(name: string): boolean {
2944 return name.startsWith('./') || name.startsWith('../') || name === '.' || name === '..' ||
2945 (name.includes('/') && !/\s/.test(name));
2946}
2947
2948/**
2949 * A JS/TS `imports` reference that names a module by path — from a script, or

Callers 2

isJsPathImportRefFunction · 0.85
isJsBareModuleRefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected