Provides sorting methods.
- Source:
Methods
- (static) sortAsc(a, b) → {*}
- (static) sortAscIgnoreUndefined(a, b) → {*}
- (static) sortDesc(a, b) → {*}
- (static) sortDescIgnoreUndefined(a, b) → {*}
(static) sortAsc(a, b) → {*}
Sorts the passed value a against the passed value b ascending.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
* | The first value to compare. |
b |
* | The second value to compare. |
- Source:
Returns:
1 if a is sorted after b, -1 if a is sorted before b.
- Type
- *
(static) sortAscIgnoreUndefined(a, b) → {*}
Sorts the passed value a against the passed value b ascending. This variant
of the sortAsc method will not consider undefined values as lower than any
other value.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
* | The first value to compare. |
b |
* | The second value to compare. |
- Source:
Returns:
1 if a is sorted after b, -1 if a is sorted before b.
- Type
- *
(static) sortDesc(a, b) → {*}
Sorts the passed value a against the passed value b descending.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
* | The first value to compare. |
b |
* | The second value to compare. |
- Source:
Returns:
1 if a is sorted after b, -1 if a is sorted before b.
- Type
- *
(static) sortDescIgnoreUndefined(a, b) → {*}
Sorts the passed value a against the passed value b descending. This variant
of the sortDesc method will not consider undefined values as lower than any
other value.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
* | The first value to compare. |
b |
* | The second value to compare. |
- Source:
Returns:
1 if a is sorted after b, -1 if a is sorted before b.
- Type
- *