Show:

Provides pre-built result highlighters for AutoComplete.

Index

Methods

Methods

charMatch

(
  • query
  • results
)
Array static

Highlights any individual query character that occurs anywhere in a result. Case-insensitive.

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

charMatchCase

(
  • query
  • results
)
Array static

Case-sensitive version of charMatch().

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

charMatchFold

(
  • query
  • results
)
Array static

Accent-folding version of charMatch().

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

phraseMatch

(
  • query
  • results
)
Array static

Highlights the complete query as a phrase anywhere within a result. Case- insensitive.

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

phraseMatchCase

(
  • query
  • results
)
Array static

Case-sensitive version of phraseMatch().

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

phraseMatchFold

(
  • query
  • results
)
Array static

Accent-folding version of phraseMatch().

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

startsWith

(
  • query
  • results
)
Array static

Highlights the complete query as a phrase at the beginning of a result. Case-insensitive.

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

startsWithCase

(
  • query
  • results
)
Array static

Case-sensitive version of startsWith().

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

startsWithFold

(
  • query
  • results
)
Array static

Accent-folding version of startsWith().

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

subWordMatch

(
  • query
  • results
)
Array static

Highlights portions of results in which words from the query match either whole words or parts of words in the result. Non-word characters like whitespace and certain punctuation are ignored. Case-insensitive.

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

subWordMatchCase

(
  • query
  • results
)
Array static

Case-sensitive version of subWordMatch().

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

subWordMatchFold

(
  • query
  • results
)
Array static

Accent-folding version of subWordMatch().

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

wordMatch

(
  • query
  • results
)
Array static

Highlights individual words in results that are also in the query. Non-word characters like punctuation are ignored. Case-insensitive.

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

wordMatchCase

(
  • query
  • results
)
Array static

Case-sensitive version of wordMatch().

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results

wordMatchFold

(
  • query
  • results
)
Array static

Accent-folding version of wordMatch().

Parameters:

  • query String

    Query to match

  • results Array

    Results to highlight

Returns:

Array:

Highlighted results