Documentation
    Preparing search index...

    Function measureRegExpSpecificity

    • Getting a proper specificity measure is a hard problem, this is but a very simple solution, that is good-enough for this usecase. It's just counting how many of the matched words letters are actually in the regex.

      For RegExp's pass in the .source

      Parameters

      • r: string
      • v: string

      Returns number