0.1.1 • Published 7 years ago

@regexp-extra/git-url v0.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
7 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

7 years ago

0.1.0

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago