
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
git-url-parse
Advanced tools
A high level git url parser for common git providers.
# Using npm
npm install --save git-url-parse
# Using yarn
yarn add git-url-parse
// Dependencies
const GitUrlParse = require("git-url-parse");
console.log(GitUrlParse("git@github.com:IonicaBizau/node-git-url-parse.git"));
// => {
// protocols: []
// , port: null
// , resource: "github.com"
// , user: "git"
// , pathname: "/IonicaBizau/node-git-url-parse.git"
// , hash: ""
// , search: ""
// , href: "git@github.com: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"));
// => "git@github.com:IonicaBizau/node-git-url-parse.git"
console.log(GitUrlParse("git@github.com:IonicaBizau/node-git-url-parse.git").toString("https"));
// => "https://github.com/IonicaBizau/node-git-url-parse.git"
There are few ways to get help:
gitUrlParse(url)Parses a Git url.
url: The Git url to parse.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.
obj: The parsed Git url object.type: The type of the stringified url (default obj.protocol).Have an idea? Found a bug? See how to contribute.
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 :rocket:
—I love books! I will remember you after years if you buy me one. :grin: :book:
—You can make one-time donations via PayPal. I'll probably buy a
coffee tea. :tea:
—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! :heart:
If you are using this library in one of your projects, add it in this list. :sparkles:
release-itdocumentationapollo@atomist/automation-client@storybook/storybook-deployer@backstage/plugin-catalog@backstage/backend-common@kadira/storybook-deployergatsby-source-gitapify-sharedumi-build-dev@atomist/automation-client-ext-raven@era-ci/utilsgit-source@qiwi/semantic-release-gh-pages-plugin@git-stack/server-core@atomist/sdm-pack-analysissemantic-release-gitmoji@nuxt/telemetry@backstage/integrationworkspace-tools@lerna/github-client@umijs/block-sdk@instructure/ui-scripts@backstage/techdocs-commonlambda-service@wetrial/block-sdkhzero-block-sdk@micro-app/shared-utilsremax-statsscaffolder-core@feizheng/next-git-url@radjs/block-sdk@log4brains/corebeachball@xdn/cli@backstage/plugin-scaffolderrenovategitbook-start-plugin-iaas-ull-es-noejaco2017autorelease-setupdocumentation-custom-markdown@hygiene/plugin-github-urlsherry-utils@unibtc/release-itclipped@erquhart/lerna-github-client@0x-lerna-fork/github-clientcommon-boilerplate@brisk-docs/website@hawkingnetwork/react-native-tab-viewmiguelcostero-ng2-toastydocula-ui@brisk-docs/gatsby-generator@microservices/clistylelint-formatter-utilsomg@facadecompany/ignition-ui@geut/git-url-parse@temporg/rds-scripts@koumoul/gh-pages-multisync-repos@atomist/cli@git-stack/hemera-plugin@yarnpkg/plugin-git@vamsikc/plugin-catalog@pubbo/github-client@atomist/uhura@s-ui/mono@zeplin/cli@atomist/skillcommittinggitbook-start-https-alex-moigitbook-start-iaas-ull-es-merquililyconyproyecto-sytw-alex-moigitbook-start-iaas-ull-es-alex-moigitbook-start-iaas-bbdd-alex-moicomplan@axetroy/git-clonegenerator-cleanphp@axetroy/gpmxgenerator-ckeditor4documentation-habitlabnodeschool-adminone-more-gitlab-clidef-coregd-clinode-coverage-serverstrappergithub-publish-npmoghsinitsmart-clonedownload-repo-cligenerator-nm-btigitcgitlinegitlab-ci-variables-cligitlab-ci-variables-setter-clidocumentation-fork@axetroy/gpmgenerator-openapi-repogit-url-promisekef-core@pvdlg/semantic-releasegitlab-tool-clisnipxyarn-upgrade-on-ci@hjin/generator-app@reframe/github-pagesbelt-repo@esops/publish-github-pages@hugomrdias/documentationjust-dev-sdk@activeviam/documentationgit-signedcz-conventional-changelog-befe@voodeng/archive@voodeng/uppackscreate-apex-js-appauto-changelog-vstsharry-reporter@campus-online/gatsby-source-gitgtnici-yarn-upgradegenerator-clearphpopenapi-repo-generatorgit-imitatevscode-gpmdocumentation42@limejs/clilime-clilaboriousrelease-it-httpbibilcov-servercreate-release-itgit-service-node@infinitecsolutions/storybook-deployer@1nd/documentationgit-cherry-fixvuepress-plugin-remote-urlgatsby-source-github-rawmoto-connector@zpmpkg/zpmkonitorrelease2hub@geut/git-compare-template@geut/chan-parsergit-observerdocula-ui-expresssn-flutter-bootspkumi-plugin-repo@epranka/create-tsx-packageflutter-bootnode-normanremote-commit-urlair-material_cli@belt/repo@arcanis/sherlock@dandean/storybook-deployergit-upstream@cratosw/gatsby-antd@tjmonsi/generator-uplb-hci-lab-project-template@tagoro9/gittldwgatsby-theme-hansinaral-vps-testgenerate-preview@temporg/ui-scriptsbitbucket-pullr@whey/gatsby-theme-whey@docomodigital/pdorauto-clonecreate-naral-servergatsby-source-git-remotes@amorist/gatsby-theme-antd@stavalfi/cicirodown@apardellass/react-native-audio-streamgatsby-theme-conechangelog.mdwp-continuous-deploymentl2forlerna@patrickhulce/scripts@cilyn/bitbucketreact-native-plugpag-wrappermeta-releasegit-csvship-releasessh-remote@senti-techlabs/generator-senti-project-templatereact-native-pulsator-native@epranka/create-packagegit-lab-cli@csmith/release-itcetus-clireact-native-kakao-mapsgenerate-github-directoryconfigorama@geeky-apo/react-native-advanced-clipboardnative-apple-loginnative-google-login@tahini/nc@shopgate/pwa-releasernative-kakao-login@hemith/react-native-tnk@cyber-tools/cyber-npm@pagedip/tool-autorelease@tcorley/storybook-addon-material-uimira@elestu/actions-dependacopreact-native-contact-listbranch-release@corelmax/react-native-my2c2p-sdkwsj.gatsby-source-git@pubcore/node-docker-buildcc-flowgit-origin-check@cloudoki/donderflowgit-multi-profilegatsby-source-npmjs@atomist/ci-sdmdocumentation-markdown-themes@git-stack/module-server@alitajs/block-sdk@jswork/topics2keywordsactions-package-update@theowenyoung/gatsby-source-gitgithub-action-readmecanarist@tru_id/tru-sdk-react-native@datalogic/react-native-datalogic-modulefotingo@rescribe/clireact-native-responsive-sizesinanews-flutter-boot@bcgov/gatsby-source-github-raw@s-ui/ci@s-ui/changeloglearning-journal-ciquery-registryreact-native-flyyreact-native-esc-pos-sahaab@s-ui/ssrwiby@gvhinks/wibygit-push-prmdnext-loadernext-mdx-booksftl-renovatemdxbookkit-commanddx-scanner@emedvedev/renovate@gasket/plugin-metrics@wolfe-labs/du-luac@vicoders/cli2@wpbrothers/sbcli@reshiftsecurity/reshift-plugin-npmdetect-node-support@dvcorg/cml@myetherwallet/mew-componentslagefstervuepress-theme-nextcreate-sourcegraph-extension@hnp/package-scripts@backstage/plugin-catalog-backend@backstage/plugin-scaffolder-backend@backstage/plugin-catalog-importpr-loggit-issuesThe parse-github-url package is a utility for parsing GitHub URLs specifically. It extracts information such as the owner, repository name, and branch. Compared to git-url-parse, it is more focused on GitHub URLs and may not support other Git hosting services.
The git-url package provides similar functionality for parsing and manipulating Git URLs. It offers methods to extract parts of the URL and convert between different URL formats. It is comparable to git-url-parse in terms of functionality but may have different API design and usage patterns.
The url-parse package is a more general-purpose URL parsing library that can handle various types of URLs, not just Git URLs. While it can be used to parse Git URLs, it does not provide Git-specific methods and properties like git-url-parse does.
FAQs
A high level git url parser for common git providers.
The npm package git-url-parse receives a total of 2,955,751 weekly downloads. As such, git-url-parse popularity was classified as popular.
We found that git-url-parse demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.