MCPcopy Create free account
hub / github.com/VSpaceCode/VSpaceCode / getFilename

Function getFilename

src/configuration/configuration.ts:92–101  ·  view source on GitHub ↗
(uri: Uri)

Source from the content-addressed store, hash-verified

90}
91
92function getFilename(uri: Uri) {
93 const pieces = uri.fsPath.split(/[/\\]/g);
94 if (pieces[pieces.length - 1].length === 0) {
95 pieces.pop();
96 }
97 if (pieces.length > 0) {
98 return pieces[pieces.length - 1];
99 }
100 return "";
101}
102
103function toHashKey(b: KeyBinding) {
104 return `${b.key}${b.command}${b.when ?? ""}`;

Callers 1

configKeyBindingsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected