1 contributor
Like
Install sort as a package?
Copied
npm i @bit/justin-capalbo.ramda.sort
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
sort (
comparator:
Function
,list:
) : Array
Array
Returns a copy of the list, sorted according to the comparator function, which should accept two values at a time and return a negative number if the first value is smaller, a positive number if it’s larger, and zero if they are equal. Please note that this is a copy of the list. It does not modify the original.
Example
Arguments
comparator:
Function
A sorting function :: a -> b -> Int
list:
Array
The list to sort
Returns
Array
a new array with its elements sorted by the comparator function.