MCPcopy
hub / github.com/FredKSchott/snowpack / isJavaScript

Function isJavaScript

snowpack/src/util.ts:469–472  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

467}
468
469export function isJavaScript(pathname: string): boolean {
470 const ext = path.extname(pathname).toLowerCase();
471 return ext === '.js' || ext === '.mjs' || ext === '.cjs';
472}
473
474export function getExtension(str: string) {
475 return path.extname(str).toLowerCase();

Callers 2

loadMethod · 0.90
buildPackageImportMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected