MCPcopy
hub / github.com/opentrace/opentrace / getExtension

Function getExtension

ui/src/components/pipeline/stages/loading.ts:39–43  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

37};
38
39export function getExtension(path: string): string {
40 const dot = path.lastIndexOf('.');
41 if (dot === -1 || dot === path.length - 1) return '';
42 return path.slice(dot);
43}
44
45export function parentDir(path: string): string {
46 const slash = path.lastIndexOf('/');

Callers 5

executeFunction · 0.90
parseFileFunction · 0.90
executeFunction · 0.90
processMethod · 0.90
loading.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected