Skip to content

The open alternative to Salesforce, designed for AI.

324 B
Raw Blame
import { isNonEmptyString } from '@sniptt/guards';

import { ASCII_WHITESPACE_REGEX } from '@/polyfills/dom/constants/AsciiWhitespaceRegex';

export const parseClassTokenList = (classAttributeValue: string): string[] => [
  ...new Set(
    classAttributeValue.split(ASCII_WHITESPACE_REGEX).filter(isNonEmptyString),
  ),
];