@primer/primitives
Version:
Typography, spacing, and color primitives for Primer design system
9 lines (8 loc) • 337 B
JavaScript
/**
* @description Checks if token has a valid `deprecated` property
* @param arguments [TransformedToken](https://github.com/amzn/style-dictionary/blob/main/types/TransformedToken.d.ts)
* @returns boolean
*/
export const isDeprecated = (token) => {
return token.$deprecated === true || typeof token.$deprecated === 'string';
};