utils.js
Utility functions and mappings for Style Dictionary
On this page
utils.js
This script provides utility functions and mappings used throughout the build system. Utilities include token type mappings, font weight normalization, and reference handling.
Key Responsibilities
- Map token types to categories (color, font, size, etc.)
- Normalize font weight names to numeric values
- Provide helper functions for reference resolution and type alignment
Example Usage
import { tokenTypes, fontWeightMap } from './utils.js'