/is-github-repo

Checks if string is a git repository

Primary LanguageTypeScriptMIT LicenseMIT

is-github-repo Build Status

Checks if string is a git repository

Install

$ yarn add is-github-repo

Usage

const isGithubRepo = require('is-github-repo')

/* with HTTPS */
isGithubRepo('https://github.com/bukinoshita/is-github-repo.git')
// => true

/* with SSH */
isGithubRepo('git@github.com:bukinoshita/is-github-repo.git')
// => true

/* with owner/repo */
isGithubRepo('bukinoshita/is-github-repo')
// => true

API

isGithubRepo(repo)

returns a boolean.

repo

Type: string
Required

Related

License

MIT © Bu Kinoshita