Package Exports
- github-star-history
- github-star-history/build/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (github-star-history) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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.
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.
