#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# AutoCompleteHighlighters Class

Defined in: `autocomplete/js/autocomplete-highlighters.js:1`
Module: autocomplete-highlighters
Parent Module: autocomplete

Provides pre-built result highlighters for AutoComplete.

- Index
- Methods

## Item Index

### Methods

- charMatch static
- charMatchCase static
- charMatchFold static
- phraseMatch static
- phraseMatchCase static
- phraseMatchFold static
- startsWith static
- startsWithCase static
- startsWithFold static
- subWordMatch static
- subWordMatchCase static
- subWordMatchFold static
- wordMatch static
- wordMatchCase static
- wordMatchFold static

## Methods

### `charMatch`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-highlighters.js:16`

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

Defined in `autocomplete/js/autocomplete-highlighters.js:40`

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

Provided by the autocomplete-highlighters-accentfold module.

Defined in `autocomplete/js/autocomplete-highlighters-accentfold.js:22`

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

Defined in `autocomplete/js/autocomplete-highlighters.js:53`

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

Defined in `autocomplete/js/autocomplete-highlighters.js:74`

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

Provided by the autocomplete-highlighters-accentfold module.

Defined in `autocomplete/js/autocomplete-highlighters-accentfold.js:39`

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

Defined in `autocomplete/js/autocomplete-highlighters.js:87`

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

Defined in `autocomplete/js/autocomplete-highlighters.js:109`

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

Provided by the autocomplete-highlighters-accentfold module.

Defined in `autocomplete/js/autocomplete-highlighters-accentfold.js:54`

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

Defined in `autocomplete/js/autocomplete-highlighters.js:122`

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

Defined in `autocomplete/js/autocomplete-highlighters.js:148`

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

Provided by the autocomplete-highlighters-accentfold module.

Defined in `autocomplete/js/autocomplete-highlighters-accentfold.js:71`

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

Defined in `autocomplete/js/autocomplete-highlighters.js:161`

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

Defined in `autocomplete/js/autocomplete-highlighters.js:182`

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

Provided by the autocomplete-highlighters-accentfold module.

Defined in `autocomplete/js/autocomplete-highlighters-accentfold.js:88`

Accent-folding version of `wordMatch()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to highlight

#### Returns:

Array: Highlighted results