Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Returns the aggregate number of stars for a user/org or single repo
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
github-stars.js
index.html

README.md

Github Stars

Returns a count of stars for any user or a single repo

Asynchronous

//user or org
githubStars("stretchr", function(stars) {
    console.log("Stars: " + stars);
});

//individual repo
githubStars("stretchr/sdk-js", function(stars) {
    console.log("Stars for SDK-JS: " + stars);
});

Synchronous

You can also perform requests synchronously if you'd prefer

var stars = githubStars("stretchr");
console.log("Stars: " + stars);
Something went wrong with that request. Please try again.