github-loc-rank
v1.1.12
Published
rank personal starred github repositories
Downloads
51
Readme
used to
Rank the lines of code (LOC) of github repositories that are starred by you.
reason why create it
because I want to join the contribution of open source repository on github, but I don't want to join a repository that's too large. I want to join the repository that is less than 20,000 lines of code, so I need to know the LOC of them.
But github don't show me the LOC. There some browser extensions can show the LOC of github repository. But they still can't fill my needs. I need to get all repositories that are written in Javascript and LOC < 20,000. So I write it by myself.
try it online
https://jasonzhouu.github.io/github-loc-rank/
import package
install:
npm i github-loc-rank -S
get the data and write to json
file:
const fs = require('fs');
const StarredRepositories = require('github-loc-rank');
(async function IIFE() {
const starredRepositories = new StarredRepositories();
let data = [];
data = await starredRepositories.init('your-github-token');
fs.writeFileSync('./repositories1.json', JSON.stringify(data, null, '\t'));
data = await starredRepositories.load();
fs.writeFileSync('./repositories2.json', JSON.stringify(data, null, '\t'));
}());