@capsizecss/metrics
Version:
Font metrics library for system and Google fonts
18 lines • 502 B
text/typescript
//#region src/index.d.ts
/**
* Converts the font family name to the correct casing for the relevant metrics import.
*
* ---
* Example usage:
*
* ```ts
* import { fontFamilyToCamelCase } from '@capsizecss/metrics';
*
* const familyName = fontFamilyToCamelCase('--apple-system'); // => `appleSystem`
* const metrics = await import(`@capsizecss/metrics/${familyName}`);
* ```
* ---
*/
declare function fontFamilyToCamelCase(str: string): string;
//#endregion
export { fontFamilyToCamelCase };