Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/transitive-bullshit/github-is-starred
Checks if a user has starred a particular GitHub repo.
https://github.com/transitive-bullshit/github-is-starred
github github-api star starred
Last synced: 2 months ago
JSON representation
Checks if a user has starred a particular GitHub repo.
- Host: GitHub
- URL: https://github.com/transitive-bullshit/github-is-starred
- Owner: transitive-bullshit
- Created: 2018-07-13T19:16:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-11T23:12:39.000Z (over 4 years ago)
- Last Synced: 2024-10-20T01:09:00.142Z (2 months ago)
- Topics: github, github-api, star, starred
- Language: JavaScript
- Size: 85.9 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# github-is-starred
> Checks if a user has starred a particular GitHub repo.
[![NPM](https://img.shields.io/npm/v/github-is-starred.svg)](https://www.npmjs.com/package/github-is-starred) [![Build Status](https://travis-ci.com/transitive-bullshit/github-is-starred.svg?branch=master)](https://travis-ci.com/transitive-bullshit/github-is-starred) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
## Install
```bash
npm install --save github-is-starred
```## Usage
```js
const githubIsStarred = require('github-is-starred')await githubIsStarred({
username: 'blaise-hansen',
repo: 'transitive-bullshit/create-react-library'
}) // => true
```## API
### githubIsStarred
Checks if a user has starred a particular GitHub repo.
Type: `function (opts): Promise`
- `opts` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Config options
- `opts.username` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** GitHub username of user to check
- `opts.repo` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Full name of GitHub repo to check
- `opts.client` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Optional authenticated `@octokit/rest` client## Related
- [github-is-starred-cli](https://github.com/transitive-bullshit/github-is-starred-cli) - CLI for this module.
- [@octokit/rest](https://github.com/octokit/rest.js) - GitHub REST API client for Node.js.## License
MIT © [Travis Fischer](https://github.com/transitive-bullshit)
Support my OSS work by following me on twitter