https://github.com/codedotjs/stafo
:fork_and_knife: Get the total number of stars and forks on a particular repository.
https://github.com/codedotjs/stafo
Last synced: 5 months ago
JSON representation
:fork_and_knife: Get the total number of stars and forks on a particular repository.
- Host: GitHub
- URL: https://github.com/codedotjs/stafo
- Owner: CodeDotJS
- License: mit
- Created: 2016-06-20T01:42:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-21T21:55:18.000Z (over 9 years ago)
- Last Synced: 2025-03-20T00:41:20.036Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stafo
> Get the total number of stars and forks on a particular github repository.
[](https://travis-ci.org/CodeDotJS/stafo)
## Install
```
$ npm install --save stafo
```
## Usage
- `stars` :
```js
'use strict';
const stafo = require('stafo');
stafo.stars('facebook/react').then(gitStars => {
console.log(gitStars);
// => 44,022
});
```
- `forks` :
```js
'use strict';
const stafo = require('stafo');
stafo.forks('facebook/react').then(gitForks => {
console.log(gitForks);
// => 7,584
});
```
## API
### __```stafo.repo('username/repository')```__
- Returns a promise for an array of defined repository property with current stars and forks.
### __```stafo.stars('username/repository')```__
- Returns a promise with ```total stars``` for the specified repository.
### __```stafo.forks('username/repository')```__
- Returns a promise with ```total forks``` for the specified repository.
__```username/repository```__
__`TYPE :`__ `string`
# License
MIT © [Rishi Giri](http://rishigiri.com)