๐ GitHub contribution streak & stat fetcher with zero dependencies
npm install contribution
import { fetchStats } from 'contribution';
// Promise chaining
fetchStats('jamieweavis')
.then((gitHubStats) => console.log(gitHubStats))
.catch((error) => console.log(error));
// Try catch with async/await
try {
const gitHubStats = await fetchStats('jamieweavis');
console.info(gitHubStats);
} catch (error) {
console.error(error);
}
interface GitHubStats {
streak: {
best: number;
current: number;
isAtRisk: boolean;
previous: number;
};
contributions: {
best: number;
total: number;
current: number;
};
}
- Streaker - ๐ GitHub contribution streak & stat tracking menu bar app
- Streaker CLI - ๐ GitHub contribution streak & stat tracking CLI app