MCPcopy Index your code
hub / github.com/fontsource/fontsource / makeFontFilePath

Function makeFontFilePath

api/cdn/src/css.ts:15–26  ·  view source on GitHub ↗
(
	tag: string,
	subset: string,
	weight: string,
	style: string,
	extension: string,
)

Source from the content-addressed store, hash-verified

13const CSS_TTL = 60 * 60 * 24; // 1 day
14
15export const makeFontFilePath = (
16 tag: string,
17 subset: string,
18 weight: string,
19 style: string,
20 extension: string,
21) => {
22 // We need to replace square brackets with empty spaces
23 return `https://cdn.jsdelivr.net/fontsource/fonts/${tag}/${subset}-${weight}-${style}.${extension}`
24 .replace('[', '')
25 .replace(']', '');
26};
27
28export const makeFontFileVariablePath = (
29 tag: string,

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected