Regex to validate that a URL is a git url.
See http://git-scm.com/book/ch4-1.html for more info.
Install with npm
$ npm i is-git-url --save
var isGitUrl = require('is-git-url');
isGitUrl('git://github.com/jonschlinkert/is-git-url.git');
//=> true
isGitUrl('https://github.com/jonschlinkert/');
//=> false
Edit on debuggex
- git-repo-name: Get the repository name from the git remote origin URL.
- git-username: Get the username from a git remote origin URL.
- github-contributors: Generate a markdown or JSON list of contributors for a project using the GitHub API.
- git-branch: Get the current branch for a local git repository.
- parse-github-url: Parse a github URL into an object.
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on July 20, 2015.