style-dictionary-utils
Version:
Utilities to use in your style dictionary config
11 lines (10 loc) • 307 B
JavaScript
/**
* getValue
* @description Returns the value of the design token, either token.value or token.$value
* @param token StyleDictionary.DesignToken
* @returns token value
*/
export const getValue = (token) => {
var _a;
return (_a = token.value) !== null && _a !== void 0 ? _a : token.$value;
};