-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Kind: global class
-
Sorter
- new Sorter([locale])
-
.sortAsc(arr) ⇒
Array
-
.sortDes(arr) ⇒
Array
-
.sortAscFunc() ⇒
function
-
.sortDesFunc() ⇒
function
-
.sortByPropAsc(arr, prop) ⇒
Array
-
.sortByPropDes(arr, prop) ⇒
Array
-
.sortByPropAscFunc(prop) ⇒
function
-
.sortByPropDesFunc(prop) ⇒
function
-
.localeSortAsc(arr) ⇒
Array
-
.localeSortDes(arr) ⇒
Array
-
.localeSortAscFunc() ⇒
function
-
.localeSortDesFunc() ⇒
function
-
.localeSortByPropAsc(arr, prop) ⇒
Array
-
.localeSortByPropDes(arr, prop) ⇒
Array
-
.localeSortByPropAscFunc(prop) ⇒
function
-
.localeSortByPropDesFunc(prop) ⇒
function
Constructs a sorter instance.
Param | Type | Description |
---|---|---|
[locale] | string |
the locale to sort by (e.g. 'en-US') |
Sorts values in ascending order.
Kind: instance method of Sorter
Returns: Array
- a new sorted Array
Param | Type | Description |
---|---|---|
arr | Array |
Array of value to sort |
Sorts values in descending order.
Kind: instance method of Sorter
Returns: Array
- a new sorted Array
Param | Type | Description |
---|---|---|
arr | Array |
Array of value to sort |
Constructs a function to sort values in ascending order.
Kind: instance method of Sorter
Constructs a function to sort values in descending order.
Kind: instance method of Sorter
Sorts an Array of objects into ascending order by a certain property.
Kind: instance method of Sorter
Returns: Array
- a new sorted Array
Param | Type | Description |
---|---|---|
arr | Array |
Array of objects to sort |
prop | string |
property to sort by |
Sorts an Array of objects into descending order by a certain property.
Kind: instance method of Sorter
Returns: Array
- a new sorted Array
Param | Type | Description |
---|---|---|
arr | Array |
Array of objects to sort |
prop | string |
property to sort by |
Constructs a function to sort values in ascending order by a certain property.
Kind: instance method of Sorter
Param | Type | Description |
---|---|---|
prop | string |
property to sort by |
Constructs a function to sort values in descending order by a certain property.
Kind: instance method of Sorter
Param | Type | Description |
---|---|---|
prop | string |
property to sort by |
Sorts values by locale in ascending order.
Kind: instance method of Sorter
Returns: Array
- a new sorted Array
Param | Type | Description |
---|---|---|
arr | Array |
Array of value to sort |
Sorts values by locale in descending order.
Kind: instance method of Sorter
Returns: Array
- a new sorted Array
Param | Type | Description |
---|---|---|
arr | Array |
Array of value to sort |
Constructs a function to sort values by locale in ascending order.
Kind: instance method of Sorter
Constructs a function to sort values by locale in descending order.
Kind: instance method of Sorter
Sorts an Array of objects by locale into ascending order by a certain property.
Kind: instance method of Sorter
Returns: Array
- a new sorted Array
Param | Type | Description |
---|---|---|
arr | Array |
Array of objects to sort |
prop | string |
property to sort by |
Sorts an Array of objects by locale into descending order by a certain property.
Kind: instance method of Sorter
Returns: Array
- a new sorted Array
Param | Type | Description |
---|---|---|
arr | Array |
Array of objects to sort |
prop | string |
property to sort by |
Constructs a function to sort values by locale in ascending order by a certain property.
Kind: instance method of Sorter
Param | Type | Description |
---|---|---|
prop | string |
property to sort by |
Constructs a function to sort values by locale in descending order by a certain property.
Kind: instance method of Sorter
Param | Type | Description |
---|---|---|
prop | string |
property to sort by |