# CollatorOptions

Options to be passed into the constructor method.

Availability
9.1.0
6.0.0
9.2.0
Extends
Object

NOTE

This is an abstract type. Any object of this structure can be used where this type is used.

# Properties

# caseFirst

Availability
6.0.0
9.2.0
caseFirst :String

Indicates if upper case or lower case characters should sort first.

Can be set to one of the following:

  • 'upper' Upper case characters are sorted before lower case characters.
  • 'lower' Lower case characters are sorted before upper case characters.
  • 'false' Use the locale's default case handling.

This option is ignored on Android.

Default: false


# ignorePunctuation

Availability
6.0.0
9.2.0
ignorePunctuation :Boolean

Indicates if punctuation characters should be ignored during the compare.

This option is ignored on Android.

Default: false


# localeMatcher

Availability
6.0.0
9.2.0
localeMatcher :String

The locale matching algorithm to use.

Can be set to 'lookup' or 'best fit'.

This option is ignored on Android.

Default: best fit


# numeric

Availability
6.0.0
9.2.0
numeric :Boolean

Indicates if numbers in string should be compared as integers.

When set true, strings containing numbers will be sorted as '1' < '2' < '10' by their numeric value instead of by their character codes.

This option is ignored on Android.

Default: false


# sensitivity

Availability
9.1.0
6.0.0
9.2.0
sensitivity :String

Indicates how characters should be compared.

Can be set to one of the following:

  • 'base' Strings that differ in base letters are unequal. For example a !== b, a === á, a === A
  • 'accent' Strings that differ in base letters and accents are unequal. For example a !== b, a !== á, a === A
  • 'case' Strings that differ in base letters or casing are unequal. For example a !== b, a === á, a !== A
  • 'variant' Strings that differ in base letters, accents, or casing are unequal. For example a !== b, a !== á, a !== A

Default: variant


# usage

Availability
6.0.0
9.2.0
usage :String

Indicates if the comparison is for sorting or searching when matching strings.

Can be set to 'sort' or 'search'.

This option is ignored on Android.

Default: sort