yarn add github-top
const githubTop = require('github-top')
githubTop('2014-08-17'/* ← A date string */)
.then(data => {
// data: { topStarred: [], topNew: [], topStarredRepeated: [] }
})
{
// Top starred repos which were not previously featured in Changelog Nightly
topStarred: Array<Repo>,
// Top new repos which were open sourced on the day you specify
topNew: Array<Repo>,
// Top starred repos were previously featured in Changelog Nightly
topStarredRepeated: Array<Repo>
}
Type: object
Example:
{
repo: 'mozilla/send',
url: 'https://github.com/mozilla/send',
description: 'File Sharing Experiment',
// Total stars
stars: 1047,
// New stars since last day
growth: 453,
// The times it appeared in changelog nightly
timesListed: 2,
language: 'JavaScript'
}
We're using axios under the hood, so you can handle http error like this:
githubTop()
.catch(err => {
if (err.response && err.response.status === 404) {
console.error('not found')
}
})
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
github-top © EGOIST, Released under the MIT License. Authored and maintained by EGOIST with help from contributors (list).
github.com/egoist · GitHub @EGOIST · Twitter @_egoistlily