hyTags
HomeHome 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
Test succeeded Test failed