class DeduplicateTransformation

Transformation that removes duplicate rules while preserving order. Also removes preceding comments when a duplicate rule is removed.

Uses a two-pass approach for clarity and performance:

  1. First pass: Build a Set of all actual rules (non-comments)
  2. Second pass: Filter rules, skipping duplicates and their preceding comments

Properties

readonly
name: string

Human-readable name of the transformation

The transformation type identifier

Methods

executeSync(rules: readonly string[]): readonly string[]

Executes the deduplication transformation synchronously.

Usage

import { DeduplicateTransformation } from ".";