This is a Backtick command to sort the list of GitHub repos, by number of stargazers, descending.
-
-
Save busterc/8189676 to your computer and use it in GitHub Desktop.
This is a Backtick (http://backtick.io) command to sort the list of GitHub repos, by number of stargazers, descending. #js #backtick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.repolist').html($('.repolist>li').sort(function(a,b){return parseInt($(b).find('a').text().replace(',',''))-parseInt($(a).find('a').text().replace(',',''))})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "GitHub Sort Repos by Stars", | |
"description": "Sort GitHub repo list by descending number of stargazers.", | |
"icon": "https://backtickio.s3.amazonaws.com/icons/backtick.png" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment