MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getModuleName

Function getModuleName

compiler/companion/src/native/NativeHelper.ts:48–52  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

46}
47
48export function getModuleName(filePath: string) {
49 const fileName = filePath.substring(filePath.lastIndexOf('/') + 1);
50 const fileNameNoExtension = fileName.split('.')[0];
51 return fileNameNoExtension;
52}
53
54export function onError(filename: string, sourceFile: ts.SourceFile, node: ts.Node, message: string): never {
55 throw new NativeCompilerError(filename, sourceFile, node, message);

Callers

nothing calls this directly

Calls 3

substringMethod · 0.80
lastIndexOfMethod · 0.80
splitMethod · 0.80

Tested by

no test coverage detected