MCPcopy Index your code
hub / github.com/LeetCode-OpenSource/vscode-leetcode / genFileExt

Function genFileExt

src/utils/problemUtils.ts:9–15  ·  view source on GitHub ↗
(language: string)

Source from the content-addressed store, hash-verified

7import { IProblem, langExt } from "../shared";
8
9export function genFileExt(language: string): string {
10 const ext: string | undefined = langExt.get(language);
11 if (!ext) {
12 throw new Error(`The language "${language}" is not supported.`);
13 }
14 return ext;
15}
16
17export function genFileName(node: IProblem, language: string): string {
18 const slug: string = _.kebabCase(node.name);

Callers 2

resolveRelativePathFunction · 0.90
genFileNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected