style-dictionary-utils
Version:
Utilities to use in your style dictionary config
7 lines (6 loc) • 434 B
JavaScript
/**
* @name isTypographic
* @type filter
* @description only returns tokens of type `typography`, `fontFamily`
*/
export const isTypographic = (token) => { var _a, _b; return ['typography', 'fontWeight', 'fontFamily'].includes((_b = (_a = token === null || token === void 0 ? void 0 : token.$type) !== null && _a !== void 0 ? _a : token === null || token === void 0 ? void 0 : token.type) !== null && _b !== void 0 ? _b : ''); };