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

Function getRequestedAxisKeys

packages/core/src/utils/variable.ts:196–209  ·  view source on GitHub ↗
(
	variableConfig: VariableAxisConfig,
	axisKeys: readonly VariableAxisKey[] | undefined,
)

Source from the content-addressed store, hash-verified

194 * axis keys.
195 */
196export const getRequestedAxisKeys = (
197 variableConfig: VariableAxisConfig,
198 axisKeys: readonly VariableAxisKey[] | undefined,
199): VariableAxisKey[] => {
200 // Filter out any empty keys.
201 const normalized = axisKeys?.map((key) => key.trim()).filter(Boolean);
202
203 if (normalized && normalized.length > 0) {
204 return [...new Set(normalized)];
205 }
206
207 // Default to all keys if the caller didn't specify any.
208 return getVariableAxisKeys(variableConfig);
209};

Callers 2

buildFontFunction · 0.90
resolveFontFacesFunction · 0.90

Calls 1

getVariableAxisKeysFunction · 0.85

Tested by

no test coverage detected