This commit is contained in:
n1474335 2022-11-25 12:26:53 +00:00
commit 23403f55a5
2 changed files with 16 additions and 2 deletions

View file

@ -103,3 +103,15 @@ export function hexadecimalSort(a, b) {
return a.localeCompare(b);
}
/**
* Comparison operation for sorting of lines by length
*
* @param {string} a
* @param {string} b
* @returns {number}
*/
export function lengthSort(a, b) {
return a.length - b.length;
}