Namespace BTM.Sort
Common sorting methods
Defined in: sorting.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Field Attributes | Field Name and Description |
|---|---|
| <static> |
BTM.Sort.currencySymbols
Currency symbols ignored when using BTM.Sort.currency
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
BTM.Sort.caseSensitive(a, b)
Case-sensitive text-sorting function
|
| <static> |
BTM.Sort.currency(a, b)
Currency sorting function
|
| <static> |
BTM.Sort.currencySymbolsRegExp()
Get the currency symbols defined in BTM.Sort.currencySymbols as a RegExp object to use with search & replace
|
| <static> |
BTM.Sort.documentOrder(a, b)
Document-Order sorting function
|
| <static> |
BTM.Sort.general(a, b)
General text-sorting function
|
| <static> |
BTM.Sort.numeric(a, b)
Numeric sorting function
|
Field Detail
<static>
BTM.Sort.currencySymbols
Currency symbols ignored when using BTM.Sort.currency
- See:
Method Detail
<static>
{Number}
BTM.Sort.caseSensitive(a, b)
Case-sensitive text-sorting function
- Parameters:
- {String} a
- the first of the two elements to compare
- {String} b
- the second of the two elements to compare
- Returns:
- {Number} either -1, 0 or 1, depending on how the two elements compare to each other
<static>
{Number}
BTM.Sort.currency(a, b)
Currency sorting function
- Parameters:
- {String} a
- the first of the two elements to compare
- {String} b
- the second of the two elements to compare
- Returns:
- {Number} either -1, 0 or 1, depending on how the two elements compare to each other
<static>
{RegExp}
BTM.Sort.currencySymbolsRegExp()
Get the currency symbols defined in BTM.Sort.currencySymbols as a RegExp object to use with search & replace
- Returns:
- {RegExp} a RegExp object to match any of the currency symbols defined in BTM.Sort.currencySymbols
<static>
{Number}
BTM.Sort.documentOrder(a, b)
Document-Order sorting function
- Parameters:
- {String} a
- the first of the two elements to compare
- {String} b
- the second of the two elements to compare
- Returns:
- {Number} either -1, 0 or 1, depending on how the two elements compare to each other
<static>
{Number}
BTM.Sort.general(a, b)
General text-sorting function
- Parameters:
- {String} a
- the first of the two elements to compare
- {String} b
- the second of the two elements to compare
- Returns:
- {Number} either -1, 0 or 1, depending on how the two elements compare to each other
<static>
{Number}
BTM.Sort.numeric(a, b)
Numeric sorting function
- Parameters:
- {String} a
- the first of the two elements to compare
- {String} b
- the second of the two elements to compare
- Returns:
- {Number} either -1, 0 or 1, depending on how the two elements compare to each other