Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created April 15, 2020 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/09e1acb1f0e601bc2c351e488a5bc040 to your computer and use it in GitHub Desktop.
Save iaindooley/09e1acb1f0e601bc2c351e488a5bc040 to your computer and use it in GitHub Desktop.
Sort list numerically
function sortListNumerically(notification)
{
new Notification(notification).movedCard().currentList().sort(function(card1,card2)
{
var ret = 0;
if(parseInt(card1.name().toLowerCase()) > parseInt(card2.name().toLowerCase()))
ret = 1;
else if(parseInt(card1.name().toLowerCase()) < parseInt(card2.name().toLowerCase()))
ret = -1;
return ret;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment