https://github.com/oprogramador/github-star-history
A library checking stars number at a given point in time for a given GitHub repo
https://github.com/oprogramador/github-star-history
Last synced: about 1 year ago
JSON representation
A library checking stars number at a given point in time for a given GitHub repo
- Host: GitHub
- URL: https://github.com/oprogramador/github-star-history
- Owner: oprogramador
- Created: 2019-12-07T11:25:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-31T12:41:39.000Z (about 1 year ago)
- Last Synced: 2025-06-01T00:58:01.093Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 470 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-star-history
[](https://opensource.org/licenses/MIT)
[](https://travis-ci.com/oprogramador/github-star-history
)
[](https://npmjs.org/package/github-star-history
)
## install
`npm i --save github-star-history` or `yarn add github-star-history`
## usage
Export your GitHub token as `GITHUB_TOKEN` env.
```js
import countStars from 'github-star-history';
// or:
// const countStars = require('github-star-history').default;
const result = await countStars('visionmedia/debug', '2019-01-01T00:00:00Z');
expect(result).to.equal(7054);
```
## notes
- Due to GitHub API limits, if the past number of stars exceeds 39990, it returns 39990.
- The returned past number of stars can change if a user unstars a given repo because GitHub API returns only the current stargazers.