FP-Devicer - v1.6.1
    Preparing search index...

    Function registerComparator

    • Register a custom similarity comparator for a field or nested path.

      The comparator replaces whatever function was previously associated with path (including any built-in default). Use registerPlugin to set both a weight and a comparator in a single call.

      Parameters

      • path: string

        Dot-notation field path, e.g. "screen.width" or "fonts".

      • comparator: Comparator

        A Comparator returning a [0, 1] similarity score.

      Returns void

      If comparator is not a function.