# Yahoo! UI Library

### arraysort 3.3.0

Yahoo! UI Library > arraysort > ArraySort
Search:
Filters Show Private Show Protected Show Deprecated

## Class ArraySort

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

### Methods

#### compare

`Boolean compare ( a , b , desc )`
Comparator function for simple case-insensitive string sorting.

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`
  Return -1 when a < b. Return 0 when a = b. Return 1 when a > b.

Copyright © 2011 Yahoo! Inc. All rights reserved.