8

Github search supports:

<keyword> language:javascript

But I want something like:

<keyword> language:javascript OR language:typescript

So that I can sort them by stars or do other filters in a single search.

The reason is: with typescript becomes more and more popular each day, single filter with language:javascript is not enought anymore.

GutenYe
  • 3,227
  • 2
  • 25
  • 21
  • You could do a non-specific search. GitHub lists all the files and on the right you can choose which languages you want to see. Among the list will be JavaScript and typescript. You can toggle between them. – cs95 Jun 14 '17 at 03:22
  • 1
    This is one workaround, but I also want to sort them by stars in a single search. – GutenYe Jun 14 '17 at 03:29

1 Answers1

3

You can do it in the command line by using github Api by a + symbol:

curl "https://api.github.com/search/repositoriesq=$guitar-scales+language:"javascript"+language:"typescript"&per_page=100&page=$i" | jq ".items[] | {name, language}"

And here is a sample from the search result:

{
  "name": "react-boilerplate",
  "language": "JavaScript"
}
{
  "name": "electrode",
  "language": "JavaScript"
}
{
  "name": "claygl",
  "language": "JavaScript"
}
{
  "name": "mean",
  "language": "TypeScript"
}
{
  "name": "rapidpro",
  "language": "JavaScript"
}
{
  "name": "react-native-scaling-drawer",
  "language": "JavaScript"
}
biruk1230
  • 3,042
  • 4
  • 16
  • 29