MCPcopy Create free account
hub / github.com/compilets/compilets / getNamespaceFromFileName

Function getNamespaceFromFileName

src/parser-utils.ts:125–128  ·  view source on GitHub ↗
(fileName: string)

Source from the content-addressed store, hash-verified

123 * Return the computed namespace from relative fileName.
124 */
125export function getNamespaceFromFileName(fileName: string) {
126 // Replace ./\ with _, so a/b/c/file.ts becomes app::a_b_c_file_ts .
127 return `app::${fileName.replace(/[\.\/\\]/g, '_')}`;
128}
129
130/**
131 * Return whether the declaration has a question token in it.

Callers 3

parseSourceFileMethod · 0.90
getNamespaceFromNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected