Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knutkirkhorn/gh-repo-has-license
:octocat: Check if a GitHub repository has a license
https://github.com/knutkirkhorn/gh-repo-has-license
checker github license nodejs repository
Last synced: 12 days ago
JSON representation
:octocat: Check if a GitHub repository has a license
- Host: GitHub
- URL: https://github.com/knutkirkhorn/gh-repo-has-license
- Owner: knutkirkhorn
- License: mit
- Created: 2018-01-07T13:44:18.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T22:44:03.000Z (over 1 year ago)
- Last Synced: 2024-10-11T10:08:54.677Z (about 1 month ago)
- Topics: checker, github, license, nodejs, repository
- Language: JavaScript
- Homepage:
- Size: 247 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gh-repo-has-license
> Check if a GitHub repository has a license
## Installation
```
npm install gh-repo-has-license
```## Usage
```js
import ghRepoHasLicense from 'gh-repo-has-license';console.log(await ghRepoHasLicense('knutkirkhorn/btc-value-cli'));
// => trueconsole.log(await ghRepoHasLicense('https://github.com/knutkirkhorn/btc-value-cli'));
// => true
```## API
### ghRepoHasLicense(repo)
Returns true if the GitHub `repo` has a license. Otherwise it returns false.
## Related
- [has-license](https://github.com/knutkirkhorn/has-license) - Check if a repository has a license
- [default-branch](https://github.com/knutkirkhorn/default-branch) - Get the default branch of a GitHub repository