Skip to content

Commit

Permalink
Update mod.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Skillz4Killz authored May 27, 2022
1 parent ed0d8a4 commit e041ba4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ export function processCommandCalculations(commands: Command[]) {
amounts.push({ name: command.name, characters });
}

console.table(amounts.sort((a, b) => b.characters - a.characters), ["name", "characters"]);
// Sort the commands by the highest to lowest
const sorted = amounts.sort((a, b) => b.characters - a.characters);
// Return the sorted characters
return sorted;
}

function calculateCharacters(command: Command) {
Expand Down

0 comments on commit e041ba4

Please sign in to comment.