All Projects → IonicaBizau → Git Url Parse

IonicaBizau / Git Url Parse

Licence: mit
✌️ A high level git url parser for common git providers.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Git Url Parse

Node Callofduty
Node Wrapper for the "private" Call Of Duty API.
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
Universal Collapsingtablayout
CollapsingToolbarLayout with TabLayout
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
Pg ha migrations
Enforces DDL/migration safety in Ruby on Rails project with an emphasis on explicitly choosing trade-offs and avoiding unnecessary magic.
Stars: ✭ 119 (+0%)
Mutual labels:  hacktoberfest
Config Lint
Command line tool to validate configuration files
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
Yii2 App Advanced
Yii 2.0 Advanced Application Template
Stars: ✭ 1,569 (+1218.49%)
Mutual labels:  hacktoberfest
Pytrustnfe
Módulo NF-e Python
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
React Spring Slider
A slider component for react
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
Editorconfig Checker
A tool to verify that your files are in harmony with your .editorconfig
Stars: ✭ 119 (+0%)
Mutual labels:  hacktoberfest
Vsc Material Theme
Material Theme, the most epic theme for Visual Studio Code
Stars: ✭ 1,617 (+1258.82%)
Mutual labels:  hacktoberfest
Useful Dev Tools
⭐️ A list with useful tools that help many Developers. Hacktoberfest ⭐️
Stars: ✭ 119 (+0%)
Mutual labels:  hacktoberfest
Camunda External Task Client Js
Implement your BPMN Service Task in NodeJS.
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
Call For Papers
List with open Call for Papers
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
Hacktoberfest2021
Raise Genuine PRs, Your PRs will be accepted, Star This Repo, You aren't allowed to Update README.md
Stars: ✭ 119 (+0%)
Mutual labels:  hacktoberfest
My Internet Speed
🛎️ Monitor the speed your ISP is delivering
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
Lumos
💡 A light Swift wrapper around Objective-C Runtime
Stars: ✭ 119 (+0%)
Mutual labels:  hacktoberfest
Menu
A JavaScript free menu library for Blazor and Razor Components applications.
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
Mangaki
Site de recommandation de mangas et d'anime
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
Docs
API Platform documentation
Stars: ✭ 119 (+0%)
Mutual labels:  hacktoberfest
Stryker4s
Mutation testing for Scala. Work in progress...
Stars: ✭ 118 (-0.84%)
Mutual labels:  hacktoberfest
Unshort.link
Prevent short link services from tracking you by unshortening the urls for your
Stars: ✭ 119 (+0%)
Mutual labels:  hacktoberfest

git-url-parse

git-url-parse

Support me on Patreon Buy me a book PayPal Ask me anything Travis Version Downloads Get help on Codementor

Buy Me A Coffee

A high level git url parser for common git providers.

☁️ Installation

# Using npm
npm install --save git-url-parse

# Using yarn
yarn add git-url-parse

📋 Example

// Dependencies
const GitUrlParse = require("git-url-parse");

console.log(GitUrlParse("[email protected]:IonicaBizau/node-git-url-parse.git"));
// => {
//     protocols: []
//   , port: null
//   , resource: "github.com"
//   , user: "git"
//   , pathname: "/IonicaBizau/node-git-url-parse.git"
//   , hash: ""
//   , search: ""
//   , href: "[email protected]:IonicaBizau/node-git-url-parse.git"
//   , token: ""
//   , protocol: "ssh"
//   , toString: [Function]
//   , source: "github.com"
//   , name: "node-git-url-parse"
//   , owner: "IonicaBizau"
// }

console.log(GitUrlParse("https://github.com/IonicaBizau/node-git-url-parse.git"));
// => {
//     protocols: ["https"]
//   , port: null
//   , resource: "github.com"
//   , user: ""
//   , pathname: "/IonicaBizau/node-git-url-parse.git"
//   , hash: ""
//   , search: ""
//   , href: "https://github.com/IonicaBizau/node-git-url-parse.git"
//   , token: ""
//   , protocol: "https"
//   , toString: [Function]
//   , source: "github.com"
//   , name: "node-git-url-parse"
//   , owner: "IonicaBizau"
// }

console.log(GitUrlParse("https://github.com/IonicaBizau/git-url-parse/blob/master/test/index.js"));
// { protocols: [ 'https' ],
//   protocol: 'https',
//   port: null,
//   resource: 'github.com',
//   user: '',
//   pathname: '/IonicaBizau/git-url-parse/blob/master/test/index.js',
//   hash: '',
//   search: '',
//   href: 'https://github.com/IonicaBizau/git-url-parse/blob/master/test/index.js',
//   token: '',
//   toString: [Function],
//   source: 'github.com',
//   name: 'git-url-parse',
//   owner: 'IonicaBizau',
//   organization: '',
//   ref: 'master',
//   filepathtype: 'blob',
//   filepath: 'test/index.js',
//   full_name: 'IonicaBizau/git-url-parse' }

console.log(GitUrlParse("https://github.com/IonicaBizau/node-git-url-parse.git").toString("ssh"));
// => "[email protected]:IonicaBizau/node-git-url-parse.git"

console.log(GitUrlParse("[email protected]:IonicaBizau/node-git-url-parse.git").toString("https"));
// => "https://github.com/IonicaBizau/node-git-url-parse.git"

❓ Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. 🐛
  3. For direct and quick help, you can use Codementor. 🚀

📝 Documentation

gitUrlParse(url)

Parses a Git url.

Params

  • String url: The Git url to parse.

Return

  • GitUrl The GitUrl object containing:
  • 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).
  • source (String): The Git provider (e.g. "github.com").
  • owner (String): The repository owner.
  • name (String): The repository name.
  • ref (String): The repository ref (e.g., "master" or "dev").
  • filepath (String): A filepath relative to the repository root.
  • filepathtype (String): The type of filepath in the url ("blob" or "tree").
  • full_name (String): The owner and name values in the owner/name format.
  • toString (Function): A function to stringify the parsed url into another url type.
  • organization (String): The organization the owner belongs to. This is CloudForge specific.
  • git_suffix (Boolean): Whether to add the .git suffix or not.

stringify(obj, type)

Stringifies a GitUrl object.

Params

  • GitUrl obj: The parsed Git url object.
  • String type: The type of the stringified url (default obj.protocol).

Return

  • String The stringified url.

😋 How to contribute

Have an idea? Found a bug? See how to contribute.

💖 Support my projects

I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).

However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:

  • Starring and sharing the projects you like 🚀

  • Buy me a book—I love books! I will remember you after years if you buy me one. 😁 📖

  • PayPal—You can make one-time donations via PayPal. I'll probably buy a coffee tea. 🍵

  • Support me on Patreon—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).

  • Bitcoin—You can send me bitcoins at this address (or scanning the code below): 1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6

Thanks! ❤️

💫 Where is this library used?

If you are using this library in one of your projects, add it in this list. ✨

  • release-it
  • documentation
  • apollo
  • @atomist/automation-client
  • @storybook/storybook-deployer
  • @backstage/plugin-catalog
  • @backstage/backend-common
  • @kadira/storybook-deployer
  • gatsby-source-git
  • apify-shared
  • umi-build-dev
  • @atomist/automation-client-ext-raven
  • @era-ci/utils
  • git-source
  • @qiwi/semantic-release-gh-pages-plugin
  • @git-stack/server-core
  • @atomist/sdm-pack-analysis
  • semantic-release-gitmoji
  • @nuxt/telemetry
  • @backstage/integration
  • workspace-tools
  • @lerna/github-client
  • @umijs/block-sdk
  • @instructure/ui-scripts
  • @backstage/techdocs-common
  • lambda-service
  • @wetrial/block-sdk
  • hzero-block-sdk
  • @micro-app/shared-utils
  • remax-stats
  • scaffolder-core
  • @feizheng/next-git-url
  • @radjs/block-sdk
  • @log4brains/core
  • beachball
  • @xdn/cli
  • @backstage/plugin-scaffolder
  • renovate
  • gitbook-start-plugin-iaas-ull-es-noejaco2017
  • autorelease-setup
  • documentation-custom-markdown
  • @hygiene/plugin-github-url
  • sherry-utils
  • @unibtc/release-it
  • clipped
  • @erquhart/lerna-github-client
  • @0x-lerna-fork/github-client
  • common-boilerplate
  • @brisk-docs/website
  • @hawkingnetwork/react-native-tab-view
  • miguelcostero-ng2-toasty
  • docula-ui
  • @brisk-docs/gatsby-generator
  • @microservices/cli
  • stylelint-formatter-utils
  • omg
  • @facadecompany/ignition-ui
  • @geut/git-url-parse
  • @temporg/rds-scripts
  • @koumoul/gh-pages-multi
  • sync-repos
  • @atomist/cli
  • @git-stack/hemera-plugin
  • @yarnpkg/plugin-git
  • @vamsikc/plugin-catalog
  • @pubbo/github-client
  • @atomist/uhura
  • @s-ui/mono
  • @zeplin/cli
  • @atomist/skill
  • committing
  • gitbook-start-https-alex-moi
  • gitbook-start-iaas-ull-es-merquililycony
  • proyecto-sytw-alex-moi
  • gitbook-start-iaas-ull-es-alex-moi
  • gitbook-start-iaas-bbdd-alex-moi
  • complan
  • @axetroy/git-clone
  • generator-cleanphp
  • @axetroy/gpmx
  • generator-ckeditor4
  • documentation-habitlab
  • nodeschool-admin
  • one-more-gitlab-cli
  • def-core
  • gd-cli
  • node-coverage-server
  • strapper
  • github-publish-npm
  • ogh
  • sinit
  • smart-clone
  • download-repo-cli
  • generator-nm-bti
  • gitc
  • gitline
  • gitlab-ci-variables-cli
  • gitlab-ci-variables-setter-cli
  • documentation-fork
  • @axetroy/gpm
  • generator-openapi-repo
  • git-url-promise
  • kef-core
  • @pvdlg/semantic-release
  • gitlab-tool-cli
  • snipx
  • yarn-upgrade-on-ci
  • @hjin/generator-app
  • @reframe/github-pages
  • belt-repo
  • @esops/publish-github-pages
  • @hugomrdias/documentation
  • just-dev-sdk
  • @activeviam/documentation
  • git-signed
  • cz-conventional-changelog-befe
  • @voodeng/archive
  • @voodeng/uppacks
  • create-apex-js-app
  • auto-changelog-vsts
  • harry-reporter
  • @campus-online/gatsby-source-git
  • gtni
  • ci-yarn-upgrade
  • generator-clearphp
  • openapi-repo-generator
  • git-imitate
  • vscode-gpm
  • documentation42
  • @limejs/cli
  • lime-cli
  • laborious
  • release-it-http
  • bibi
  • lcov-server
  • create-release-it
  • git-service-node
  • @infinitecsolutions/storybook-deployer
  • @1nd/documentation
  • git-cherry-fix
  • vuepress-plugin-remote-url
  • gatsby-source-github-raw
  • moto-connector
  • @zpmpkg/zpm
  • konitor
  • release2hub
  • @geut/git-compare-template
  • @geut/chan-parser
  • git-observer
  • docula-ui-express
  • sn-flutter-boot
  • spk
  • umi-plugin-repo
  • @epranka/create-tsx-package
  • flutter-boot
  • node-norman
  • remote-commit-url
  • air-material_cli
  • @belt/repo
  • @arcanis/sherlock
  • @dandean/storybook-deployer
  • git-upstream
  • @cratosw/gatsby-antd
  • @tjmonsi/generator-uplb-hci-lab-project-template
  • @tagoro9/git
  • tldw
  • gatsby-theme-hansin
  • aral-vps-test
  • generate-preview
  • @temporg/ui-scripts
  • bitbucket-pullr
  • @whey/gatsby-theme-whey
  • @docomodigital/pdor
  • auto-clone
  • create-n
  • aral-server
  • gatsby-source-git-remotes
  • @amorist/gatsby-theme-antd
  • @stavalfi/ci
  • cirodown
  • @apardellass/react-native-audio-stream
  • gatsby-theme-cone
  • changelog.md
  • wp-continuous-deployment
  • l2forlerna
  • @patrickhulce/scripts
  • @cilyn/bitbucket
  • react-native-plugpag-wrapper
  • meta-release
  • git-csv
  • ship-release
  • ssh-remote
  • @senti-techlabs/generator-senti-project-template
  • react-native-pulsator-native
  • @epranka/create-package
  • git-lab-cli
  • @csmith/release-it
  • cetus-cli
  • react-native-kakao-maps
  • generate-github-directory
  • configorama
  • @geeky-apo/react-native-advanced-clipboard
  • native-apple-login
  • native-google-login
  • @tahini/nc
  • @shopgate/pwa-releaser
  • native-kakao-login
  • @hemith/react-native-tnk
  • @cyber-tools/cyber-npm
  • @pagedip/tool-autorelease
  • @tcorley/storybook-addon-material-ui
  • mira
  • @elestu/actions-dependacop
  • react-native-contact-list
  • branch-release
  • @corelmax/react-native-my2c2p-sdk
  • wsj.gatsby-source-git
  • @pubcore/node-docker-build
  • cc-flow
  • git-origin-check
  • @cloudoki/donderflow
  • git-multi-profile
  • gatsby-source-npmjs
  • @atomist/ci-sdm
  • documentation-markdown-themes
  • @git-stack/module-server
  • @alitajs/block-sdk
  • @jswork/topics2keywords
  • actions-package-update
  • @theowenyoung/gatsby-source-git
  • github-action-readme
  • canarist
  • @tru_id/tru-sdk-react-native
  • @datalogic/react-native-datalogic-module
  • fotingo
  • @rescribe/cli
  • react-native-responsive-size
  • sinanews-flutter-boot
  • @bcgov/gatsby-source-github-raw
  • @s-ui/ci
  • @s-ui/changelog
  • learning-journal-ci
  • query-registry
  • react-native-flyy
  • react-native-esc-pos-sahaab
  • @s-ui/ssr
  • wiby
  • @gvhinks/wiby
  • git-push-pr
  • mdnext-loader
  • next-mdx-books
  • ftl-renovate
  • mdxbook
  • kit-command
  • dx-scanner
  • @emedvedev/renovate
  • @gasket/plugin-metrics
  • @wolfe-labs/du-luac
  • @vicoders/cli2
  • @wpbrothers/sbcli
  • @reshiftsecurity/reshift-plugin-npm
  • detect-node-support
  • @dvcorg/cml
  • @myetherwallet/mew-components
  • lage
  • fster
  • vuepress-theme-next
  • create-sourcegraph-extension
  • @hnp/package-scripts
  • @backstage/plugin-catalog-backend
  • @backstage/plugin-scaffolder-backend
  • @backstage/plugin-catalog-import
  • pr-log
  • git-issues

📜 License

MIT © Ionică Bizău

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].