Skip to content

Theemo / @theemo/style-dictionary / isNoReferenceToken

Function: isNoReferenceToken()

ts
function isNoReferenceToken(token): boolean;

Defined in: filters/reference.ts:69

Check whether a token has NO reference to another token.

Parameters

ParameterTypeDescription
tokenTransformedTokenthe token in question

Returns

boolean

true when the token references NO other token, otherwise false

Example

Usage:

js
import StyleDictionary from 'style-dictionary';
import { isNoReferenceToken } from '@theemo/style-dictionary';

export default {
  source: ['tokens/**/*.json'],
  platforms: {
    css: {
      files: [
        {
          format: 'css/variables',
          destination: 'raw-tokens.css',
          filter: isNoReferenceToken
        }
      ]
    }
  }
};