
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
is-github-url
Advanced tools
Check if a passed string is a valid GitHub URL
Unlike is-git-url, is-github-url is a domain-specific validator. It returns true
if passed URL is a part of github.com
domain only.
$ npm install is-github-url --save
var isGithubUrl = require('is-github-url');
// Valid examples
isGithubUrl('https://github.com/facebook');
// => true
isGithubUrl('https://github.com/facebook/react');
// => true
isGithubUrl('https://github.com/facebook/react/releases/tag/v0.14.0');
// => true
isGithubUrl('git@github.com:facebook/react.git');
// => true
isGithubUrl('git://github.com/facebook/react.git#gh-pages');
// => true
// Invalid examples
isGithubUrl('https://google.com');
// => false
isGithubUrl('unknown://github.com');
// => false
isGithubUrl('http://facebook.github.io/');
// => false
// Repository mode can be used to check whether a passed URL
// is a valid repository URL
isGithubUrl('https://github.com/facebook/react', { repository: true });
// => true
isGithubUrl('https://github.com/facebook', { repository: true });
// => false
isGithubUrl('https://github.com/facebook/react/releases/tag/v0.14.0', {
repository: true
});
// => false
// Strict mode is used to validate URLs before cloning
// Strict mode turns on automatically if URL contains git protocol
isGithubUrl('https://github.com/facebook/react.git', { strict: true });
// => true
isGithubUrl('https://github.com/facebook/react', { strict: true });
// => false
isGithubUrl(url, [options])
Check if a passed string is a valid GitHub URL
url
: A string to be validatedoptions
: An object containing the following fields:
strict
(Boolean): Match only URLs ending with .gitrepository
(Boolean): Match only valid GitHub repo URLsMIT © Philipp Alferov
FAQs
Check if a passed string is a valid GitHub URL
The npm package is-github-url receives a total of 365 weekly downloads. As such, is-github-url popularity was classified as not popular.
We found that is-github-url demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.