MCPcopy Index your code
hub / github.com/continuedev/continue / getFileExtensionFromBasename

Function getFileExtensionFromBasename

core/util/uri.ts:93–99  ·  view source on GitHub ↗
(basename: string)

Source from the content-addressed store, hash-verified

91}
92
93export function getFileExtensionFromBasename(basename: string) {
94 const parts = basename.split(".");
95 if (parts.length < 2) {
96 return "";
97 }
98 return (parts.slice(-1)[0] ?? "").toLowerCase();
99}
100
101/*
102 Returns the file extension of a URI

Callers 3

uri.test.tsFile · 0.90
getUriFileExtensionFunction · 0.85
getUriDescriptionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected