Skip to content

Variable: COMBINATOR ​

ts
const COMBINATOR: Regex<"\\s*(?<comb>[>+~])\\s*|(?<desc>\\s+)", {
  flags: "u";
  names: {
     comb?: string;
     desc?: string;
  };
}>;

Defined in: packages/regex/src/tiers/cssdoc-local.ts:169

Combinator Pattern Matches CSS combinators: space (descendant), > (child), + (adjacent), ~ (general sibling) Used for selector structure analysis.

Example ​

ts
COMBINATOR.test(">") // true (child)
COMBINATOR.test("+") // true (adjacent sibling)

Released under the MIT License