Document the stableSort function

This commit is contained in:
Guillaume Beraudo committed 2018-08-06 10:50:18 +02:00
1 parent a4178d05ef
commit abbfb5c653
1 file changed
+3 -1
+3 -1
View File
@@ -194,8 +194,10 @@ export function equals(arr1, arr2) {
/**
* Sort the passed array such that the relative order of equal elements is preverved.
* See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.
* @param {Array<*>} arr The array to sort (modifies original).
* @param {Function} compareFnc Comparison function.
* @param {!function(*, *): number} compareFnc Comparison function.
* @api
*/
export function stableSort(arr, compareFnc) {