0.1.1 • Published 6 years ago

@regexp-extra/git-url v0.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

RegExp for matching Git URL.

const GIT_URL = require('@regexp-extra/git-url');
// -> regular expression (global)


GIT_URL.test('https://github.com/user/');
// false

var str = 'repo: git://github.com/user/repo.git';
GIT_URL.test(str);
// true

new RegExp(GIT_URL).exec(str);
// [ 'git://github.com/user/repo.git',
//   'git://',                    (protocol)
//   'github.com/user/repo.git',  (path)
//   '',                          (fragment)
//   index: 6,
//   input: 'repo: git://github.com/user/repo.git',
//   groups: undefined ]

NPM

credits: taken directly from jonschlinkert/is-git-url.

0.1.1

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago