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

Function isJavaScript

src/javascript/imports.ts:122–124  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

120}
121
122export function isJavaScript(path: string): boolean {
123 return /\.(m|c)?js(\?|$)/i.test(path);
124}
125
126const parseImportsCache = new Map<string, Promise<ImportReference[]>>();
127

Callers 3

transpileModuleFunction · 0.70
CallExpressionFunction · 0.70
parseImportsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected