API Docs for: 3.8.0
Show:

ArraySort Class

Provides a case-insenstive comparator which can be used for array sorting.

Item Index

Methods

Methods

compare

(
  • a
  • b
  • desc
)
Boolean

Comparator function for simple case-insensitive sorting of an array of strings.

Parameters:

  • a Object

    First sort argument.

  • b Object

    Second sort argument.

  • desc Boolean

    true if sort direction is descending, false if sort direction is ascending.

Returns:

Boolean: -1 when a < b. 0 when a == b. 1 when a > b.