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

    Function registerPlugin

    • Register a weight and/or comparator for a field path in one call.

      This is the most common extension point. Either weight or comparator (or both) may be provided; omitted properties are left unchanged.

      Parameters

      • path: string

        Dot-notation field path.

      • config: { comparator?: Comparator; weight?: number }

        An object with optional weight and/or comparator.

      Returns void

      registerPlugin('userAgent', {
      weight: 25,
      comparator: (a, b) => levenshteinSimilarity(a, b),
      });