pols-utils - v5.3.11
    Preparing search index...

    Function textMatch

    • Evaluates whether a text matches another text. The comparison is case-insensitive, ignores accent marks, and allows partial word matching.

      Parameters

      • value: string

        The target text.

      • queryText: string

        The text to search for.

      Returns boolean

      true if the target text matches the query text, otherwise false.

      console.log(PUtilsString.textMatch('This is a target text', 'target')) // true
      console.log(PUtilsString.textMatch('This is a target text', 'tar')) // true
      console.log(PUtilsString.textMatch('This is a target text', 'TAR')) // true
      console.log(PUtilsString.textMatch('This is a target text', 'th tex')) // true
      console.log(PUtilsString.textMatch('This is a target text', 'asd')) // false
      console.log(PUtilsString.textMatch('This is a target text', 'th i ta tex')) // true