git-up
A low level git url parser.
:cloud: Installation
$ npm i --save git-up
:clipboard: Example
var gitUp = require("git-up");
console.log(gitUp("git@github.com:IonicaBizau/node-parse-url.git"));
console.log(gitUp("https://github.com/IonicaBizau/node-parse-url.git"));
:memo: Documentation
gitUp(input)
Parses the input url.
Params
- String
input
: The input url.
Return
- Object An object containing the following fields:
protocols
(Array): An array with the url protocols (usually it has one element).port
(null|Number): The domain port.resource
(String): The url domain (including subdomains).user
(String): The authentication user (usually for ssh urls).pathname
(String): The url pathname.hash
(String): The url hash.search
(String): The url querystring value.href
(String): The input url.protocol
(String): The git url protocol.token
(String): The oauth token (could appear in the https urls).
:yum: How to contribute
Have an idea? Found a bug? See how to contribute.
:moneybag: Donations
Another way to support the development of my open-source modules is
to set up a recurring donation, via Patreon. :rocket:
PayPal donations are appreciated too! Each dollar helps.
Thanks! :heart:
:dizzy: Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:
git-url-parse
—A high level git url parser for common git providers.ship-release
—Publish new versions on GitHub and npm with ease.
:scroll: License
MIT © Ionică Bizău