MCPcopy Create free account
hub / github.com/fontsource/fontsource / stripExtension

Function stripExtension

packages/core/src/conversion.ts:12–15  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

10}
11
12const stripExtension = (name: string): string => {
13 const lastDot = name.lastIndexOf('.');
14 return lastDot === -1 ? name : name.slice(0, lastDot);
15};
16
17const deriveBaseName = async (
18 glyphtContext: FontContext['glyphtContext'],

Callers 1

convertFontFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected