MCPcopy Index your code
hub / github.com/TypeScriptToLua/TypeScriptToLua / trimExtension

Function trimExtension

src/utils.ts:39–39  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

37
38export const normalizeSlashes = (filePath: string) => filePath.replace(/\\/g, "/");
39export const trimExtension = (filePath: string) => filePath.slice(0, -path.extname(filePath).length);
40
41export function formatPathToLuaPath(filePath: string): string {
42 filePath = filePath.replace(/\.json$/, "");

Callers 4

hasSourceFileInProjectFunction · 0.90
removeFileExtensionFunction · 0.90
createModulePathFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected