MCPcopy
hub / github.com/ritwickdey/vscode-live-server / IsSupportedFile

Method IsSupportedFile

src/Helper.ts:67–70  ·  view source on GitHub ↗

* It returns true if file is supported. input can be in full file path or just filename with extension name. * @param file: can be path/subpath/file.ts or file.ts

(file: string)

Source from the content-addressed store, hash-verified

65 * @param file: can be path/subpath/file.ts or file.ts
66 */
67 public static IsSupportedFile(file: string): boolean {
68 let ext = path.extname(file) || (file.startsWith('.') ? file : `.${file}`);
69 return SUPPORTED_EXT.indexOf(ext.toLowerCase()) > -1;
70 }
71
72
73 /**

Callers 2

helper.test.tsFile · 0.80
getSubPathMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected