MCPcopy
hub / github.com/facebook/react / stripExtension

Function stripExtension

compiler/packages/snap/src/fixture-utils.ts:38–45  ·  view source on GitHub ↗
(filename: string, extensions: Array<string>)

Source from the content-addressed store, hash-verified

36}
37
38function stripExtension(filename: string, extensions: Array<string>): string {
39 for (const ext of extensions) {
40 if (filename.endsWith(ext)) {
41 return filename.slice(0, -ext.length);
42 }
43 }
44 return filename;
45}
46
47export async function readTestFilter(): Promise<TestFilter | null> {
48 if (!(await exists(FILTER_PATH))) {

Callers 3

getBasenameFunction · 0.85
readInputFixturesFunction · 0.85
readOutputFixturesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected