git-url-parse

Build Status License Dart

A high level git url parser for common git providers.

Usage

import 'package:git_url_parse/git-url-parse.dart' show gitUrlParse;

void main(){
  Map<String,dynamic> gitUrlInfo = gitUrlParse([email protected]:gpmer/gpm.js.git');
  
  print(urlInfo);
}
# print out
{
  "href": "[email protected]:gpmer/gpm.js.git",
  "protocols": [
    "https",
    "git"
  ],
  "protocol": "https",
  "port": 443,
  "host": "github.com",
  "user": "gpmer",
  "password": "",
  "origin": "[email protected]",
  "path": "/gpm.js.git",
  "query": "",
  "hash": "",
  "source": "github.com",
  "name": "gpm.js",
  "owner": "gpmer",
  "full_name": "gpmer/gpm.js"
}

Test

./TEST

Contribute

git clone https://github.com/axetroy/git-url-parse.git && cd ./git-url-parse
pub get
./TEST

LICENSE

The MIT License

Libraries

urlParse