hyTags
HomeHome Getting StartedGetting Started DocumentationDocumentation

array-sort-by

Creates a new array with elements sorted by a custom comparison value.
Parameter
Type
Description
self
[T]
Array to sort
asc
bool
Whether to sort in ascending order (defaults to true)
commands
commands
Commands that return the value to sort by for each element
return
[T]
New array with elements sorted by comparison value