UNPKG

style-dictionary-utils

Version:
10 lines (9 loc) 305 B
/** * @name isDeprecated * @type filter * @description only returns tokens with deprecated = true */ export const isDeprecated = (token) => { const deprecated = token.deprecated || token.$deprecated; return (typeof deprecated === 'string' && deprecated !== 'false') || deprecated === true; };