{"name":"parse-path","version":"7.0.1","keywords":["parse","path","url","node","git","advanced"],"author":{"url":"https://ionicabizau.net","name":"Ionică Bizău","email":"bizauionica@gmail.com"},"license":"MIT","_id":"parse-path@7.0.1","maintainers":[{"name":"simon-p-r","email":"simon.ricaldone@circabs.com"},{"name":"ionicabizau","email":"bizauionica@gmail.com"}],"homepage":"https://github.com/IonicaBizau/parse-path","bugs":{"url":"https://github.com/IonicaBizau/parse-path/issues"},"dist":{"shasum":"ae548cd36315fd8881a3610eae99fa08123ee0e2","tarball":"http://registry-npm.ywwl.com/parse-path/download/parse-path-7.0.1.tgz","fileCount":4,"integrity":"sha512-6ReLMptznuuOEzLoGEa+I1oWRSj2Zna5jLWC+l6zlfAI4dbbSaIES29ThzuPkbhNahT65dWzfoZEO6cfJw2Ksg==","signatures":[{"sig":"MEYCIQCLu/evAhD3IK7MvkN6qcokw6njzpoR5bgEC0JZpzTA/QIhAJ9dwgxn8FpAVdElD/1/HLuPUj/L0KQIof/vNLWxIFsR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20785,"size":7308,"noattachment":false,"key":"/parse-path/-/parse-path-7.0.1.tgz"},"main":"lib/index.js","gitHead":"87f71f273da90f85f6845937a70b7c032eeae4e3","scripts":{"test":"node test"},"_npmUser":{"name":"ionicabizau","email":"bizauionica@gmail.com"},"repository":{"url":"git+https://github.com/IonicaBizau/parse-path.git","type":"git"},"_npmVersion":"10.9.2","description":"Parse paths (local paths, urls: ssh/git/etc)","directories":{"test":"test","example":"example"},"_nodeVersion":"23.6.0","dependencies":{"protocols":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tester":"^1.4.5"},"_npmOperationalInternal":{"tmp":"tmp/parse-path_7.0.1_1739495469335_0.0357480398870873","host":"s3://npm-registry-packages-npm-production"},"readme":"<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# parse-path\n\n [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Travis](https://img.shields.io/travis/IonicaBizau/parse-path.svg)](https://travis-ci.org/IonicaBizau/parse-path/) [![Version](https://img.shields.io/npm/v/parse-path.svg)](https://www.npmjs.com/package/parse-path) [![Downloads](https://img.shields.io/npm/dt/parse-path.svg)](https://www.npmjs.com/package/parse-path) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/@johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)\n\n<a href=\"https://www.buymeacoffee.com/H96WwChMy\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png\" alt=\"Buy Me A Coffee\"></a>\n\n\n\n\n\n\n\n> Parse paths (local paths, urls: ssh/git/etc)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :cloud: Installation\n\n```sh\n# Using npm\nnpm install --save parse-path\n\n# Using yarn\nyarn add parse-path\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :clipboard: Example\n\n\n\n```js\n// Dependencies\nconst parsePath = require(\"parse-path\")\n\nconsole.log(parsePath(\"http://ionicabizau.net/blog\"))\n// {\n//   protocols: [ 'http' ],\n//   protocol: 'http',\n//   port: '',\n//   resource: 'ionicabizau.net',\n//   user: '',\n//   password: '',\n//   pathname: '/blog',\n//   hash: '',\n//   search: '',\n//   href: 'http://ionicabizau.net/blog',\n//   query: {}\n// }\n\nconsole.log(parsePath(\"http://domain.com/path/name?foo=bar&bar=42#some-hash\"))\n// {\n//   protocols: [ 'http' ],\n//   protocol: 'http',\n//   port: '',\n//   resource: 'domain.com',\n//   user: '',\n//   password: '',\n//   pathname: '/path/name',\n//   hash: 'some-hash',\n//   search: 'foo=bar&bar=42',\n//   href: 'http://domain.com/path/name?foo=bar&bar=42#some-hash',\n//   query: { foo: 'bar', bar: '42' }\n// }\n\nconsole.log(parsePath(\"git+ssh://git@host.xz/path/name.git\"))\n// {\n//   protocols: [ 'git', 'ssh' ],\n//   protocol: 'git',\n//   port: '',\n//   resource: 'host.xz',\n//   user: 'git',\n//   password: '',\n//   pathname: '/path/name.git',\n//   hash: '',\n//   search: '',\n//   href: 'git+ssh://git@host.xz/path/name.git',\n//   query: {}\n// }\n```\n\n\n\n\n\n\n\n\n\n\n\n## :memo: Documentation\n\n\n### `parsePath(url)`\nParses the input url.\n\n#### Params\n\n- **String** `url`: The input url.\n\n#### Return\n- **Object** An object containing the following fields:\n   - `protocols` (Array): An array with the url protocols (usually it has one element).\n   - `protocol` (String): The first protocol or `\"file\"`.\n   - `port` (String): The domain port (default: `\"\"`).\n   - `resource` (String): The url domain/hostname.\n   - `host` (String): The url domain (including subdomain and port).\n   - `user` (String): The authentication user (default: `\"\"`).\n   - `password` (String): The authentication password (default: `\"\"`).\n   - `pathname` (String): The url pathname.\n   - `hash` (String): The url hash.\n   - `search` (String): The url querystring value (excluding `?`).\n   - `href` (String): The normalized input url.\n   - `query` (Object): The url querystring, parsed as object.\n   - `parse_failed` (Boolean): Whether the parsing failed or not.\n\n\n\n\n\n\n\n\n\n## :question: Get Help\n\nThere are few ways to get help:\n\n\n\n 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.\n 2. For bug reports and feature requests, open issues. :bug:\n 3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :yum: How to contribute\nHave an idea? Found a bug? See [how to contribute][contributing].\n\n\n## :sparkling_heart: Support my projects\nI open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously,\nthis 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).\n\nHowever, 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:\n\n\n - Starring and sharing the projects you like :rocket:\n - [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:\n - [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:\n - [![Support me on Patreon][badge_patreon]][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).\n - **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`\n\n    ![](https://i.imgur.com/z6OQI95.png)\n\n\nThanks! :heart:\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## :dizzy: Where is this library used?\nIf you are using this library in one of your projects, add it in this list. :sparkles:\n\n - `@_nomtek/react-native-shimmer-animation`\n - `@aabelmann/ui-layer`\n - `@abhinavoneuipoc/stencil-test`\n - `@adamsalm/gitlab`\n - `@adatechnology/react-native-android-getnet-pos`\n - `@adembacaj/react-native-google-pay`\n - `@ahmed_shaban123/react-native-currencyinput`\n - `@ali5049/react-native-buttons`\n - `@alphy11/semantic-release-gitlab`\n - `@amirdiafi/react-native-ios-haptics`\n - `@amiruldev/wajs`\n - `@apardellass/react-native-audio-stream`\n - `@aruntestpayment/react-native-payu-payment`\n - `@aviinash_jha/react-native-test_multiply`\n - `@aysea/react-native-ui-library`\n - `@azalpacir/react-native-dhp-printer`\n - `@brantalikp/rn-resize`\n - `@buganto/client`\n - `@casimir.one/vuetify-extended`\n - `@cloudoki/donderflow`\n - `@con-test/react-native-concent-common`\n - `@corelmax/react-native-my2c2p-sdk`\n - `@cs6/react-native-test-native-view-library`\n - `@damruravihara/react-native-testing-package`\n - `@devdiary/semantic-devdiary-release`\n - `@enkeledi/react-native-week-month-date-picker`\n - `@extrieve_technologies/quickcapture_react_native`\n - `@felipesimmi/react-native-datalogic-module`\n - `@fgreinacher/semantic-release-gitlab`\n - `@flareapp/ignition-ui`\n - `@geeky-apo/react-native-advanced-clipboard`\n - `@happy-gastro/react-native-printer-module`\n - `@hawkingnetwork/react-native-tab-view`\n - `@hbglobal/react-native-actions-shortcuts`\n - `@hemith/react-native-tnk`\n - `@hieuquang2212/form`\n - `@idas1/ui-component-lib`\n - `@j4s0n/semantic-release-gitlab`\n - `@jfilipe-sparta/react-native-module_2`\n - `@kgit/readability`\n - `@kgit/readbility`\n - `@labiebhn_/react-native-multiplier`\n - `@lehuyaa/my-assets`\n - `@logisticinfotech/react-native-geocoding-reversegeocoding`\n - `@mittwald/api-client-commons`\n - `@navabi/react-native-ssl-pinning`\n - `@oiti/rn-liveness2d`\n - `@okayhq/backstage-backend-plugin`\n - `@orgbluetooth/react-native-arunpayupayment`\n - `@orgbluetooth/react-native-payupayment`\n - `@parallelnft/web3modal`\n - `@podpodium/common`\n - `@ponchodien/react-native-printer-imin`\n - `@positionex/position-sdk`\n - `@praella/localisationist`\n - `@pvm/github`\n - `@pvm/gitlab`\n - `@react-18-pdf/root`\n - `@react-native-ui-design/button`\n - `@saad27/react-native-bottom-tab-tour`\n - `@safely-project/safely-ts`\n - `@sephriot/react-native-persistable-uri`\n - `@sidghimire/react-native-mapbox-navigation`\n - `@sridharetikala/react-native-rn-lib-custom-components`\n - `@status-im/react-native-transparent-video`\n - `@syedt/hellosdk`\n - `@taingo97/react-native-awesome-module`\n - `@taingo97/react-native-bluetooth-xprinter`\n - `@taingo97/react-native-expo-key-rsa-kt`\n - `@taingo97/react-native-expo-rsa`\n - `@taingo97/react-native-generate-key-rsa`\n - `@taingo97/react-native-key-rsa`\n - `@taingo97/react-native-print-xprinter`\n - `@taingo97/react-native-printer-imin`\n - `@taingo97/react-native-rsa`\n - `@taingo97/react-native-rsa-expo`\n - `@taingo97/react-native-sunmi-printer`\n - `@taingo97/react-native-telpo-printer`\n - `@thinxviewx/core-rn`\n - `@tjoussen/semantic-release-gitlab-mr`\n - `@tlgeo/react-native-gdal`\n - `@tomw2w/my-nuxt-layer`\n - `@visioglobe/react-native-visioglobe`\n - `@wecraftapps/react-native-use-keyboard`\n - `@xudong/semantic-release-gitlab`\n - `@yplabs-ltd/react-native-detector`\n - `@zotasys/native`\n - `agent-get-agent`\n - `anakketiga`\n - `anaklanangtea`\n - `anakwadontea`\n - `archlibrary`\n - `arifbudixz`\n - `astra-ufo-sdk`\n - `awesome-module-kd`\n - `biometric-st`\n - `birken-react-native-community-image-editor`\n - `candlelabssdk`\n - `checkbox-component`\n - `connex-kakilang`\n - `connex_ram00nez`\n - `demo-test-scrn`\n - `design-system-trial-milyasbpa`\n - `dogandev-simple-toast`\n - `domaincomponent`\n - `expo-renavigate`\n - `fawaterak-online-payment`\n - `fawatrak-online-payment`\n - `fixed_form_builder`\n - `fluent.adflow.reactnativesdk`\n - `fluent.adflow.reactnativesdk-alpha`\n - `fmsl`\n - `framework_test_library_sixdee`\n - `framework_test_library_sixdee_new`\n - `framework_test_library_sixdee_new_new`\n - `gamification-integration-new`\n - `gaurav-react-native-loop`\n - `genz-native-elements`\n - `gerimismalamsenin`\n - `gh-monoproject-cli`\n - `hong1-utils`\n - `iiif-manifest-editor`\n - `jamuskalim`\n - `jesh-calculation`\n - `jnf-accesscontrol-rnttl`\n - `jordy-frijters-test-lib`\n - `jrennsoh88-react-native-scroll-indicator`\n - `khaled-salem-custom-components`\n - `knex-paginate-transaction`\n - `l2forlerna`\n - `load-object`\n - `loast`\n - `luojia-cli-dev`\n - `mangudinlagirajin`\n - `native-apple-login`\n - `native-date-picker-module`\n - `native-google-login`\n - `native-kakao-login`\n - `native-modal-damage-vehicle`\n - `new-awesome-4321`\n - `npm_one_12_34_1_`\n - `npm_one_1_2_3`\n - `npm_one_2_2`\n - `npm_qwerty`\n - `nuxtpaginations`\n - `octopulse`\n - `ori-bot-react-native`\n - `parse-url`\n - `patepangdeui`\n - `payutesting`\n - `pileuleuyantea`\n - `pnm-yph-react-native-custom-components`\n - `project-wajs-dv`\n - `pyreswap-sdk`\n - `raact-native-arunramya151`\n - `reac-native-arun-ramya-test`\n - `react-fsm-router`\n - `react-native-adarsh_react_native_video_player`\n - `react-native-addition`\n - `react-native-android-native-view`\n - `react-native-android-video-player-view`\n - `react-native-android-view`\n - `react-native-animate-text`\n - `react-native-app-bubble`\n - `react-native-app-integrity-checksum`\n - `react-native-arps-authorize-net`\n - `react-native-arun-ramya-test`\n - `react-native-arunjeyam1987`\n - `react-native-arunmeena1987`\n - `react-native-arunramya151`\n - `react-native-auth-service-client`\n - `react-native-aventonfacetec-aventon`\n - `react-native-awesome-android-123`\n - `react-native-awesome-android-123-zeotap`\n - `react-native-awesome-module-dharmesh`\n - `react-native-awesome-module-latest`\n - `react-native-awesome-module-two`\n - `react-native-azure-communication-services`\n - `react-native-badge-control`\n - `react-native-basic-app`\n - `react-native-basic-screen`\n - `react-native-biometric-authenticate`\n - `react-native-bleccs-components`\n - `react-native-bluetooth-device-detect`\n - `react-native-bottom-tab-designs`\n - `react-native-bridge-package`\n - `react-native-bubble-chart`\n - `react-native-build-vesion-getter`\n - `react-native-check-component`\n - `react-native-chenaar`\n - `react-native-components-design`\n - `react-native-conekta-card-tokenizer`\n - `react-native-contact-list`\n - `react-native-cplus`\n - `react-native-create-video-thumbnail`\n - `react-native-ctp-odp`\n - `react-native-custom-image-carousel`\n - `react-native-custom-poccomponent`\n - `react-native-custom-poccomponent-next`\n - `react-native-custome-component-demo`\n - `react-native-datacapture-core`\n - `react-native-dff-components-demo`\n - `react-native-dhp-printer`\n - `react-native-dimensions-layout`\n - `react-native-dsphoto-module`\n - `react-native-dummy-view`\n - `react-native-escape`\n - `react-native-fedlight-dsm`\n - `react-native-geo-locator`\n - `react-native-get-countries`\n - `react-native-ghn-ekyc`\n - `react-native-ideo-rn-notifications`\n - `react-native-innity-2`\n - `react-native-innity-remaster`\n - `react-native-input-library`\n - `react-native-is7`\n - `react-native-jsi-device-info`\n - `react-native-kakao-maps`\n - `react-native-klarify-ios`\n - `react-native-klarify-ui`\n - `react-native-klc`\n - `react-native-lazp-device-info`\n - `react-native-lib-test-rn-1`\n - `react-native-library-testing-422522`\n - `react-native-line-login-android`\n - `react-native-login-demo-test`\n - `react-native-lowlatency`\n - `react-native-loyalty-platforms`\n - `react-native-manh-test`\n - `react-native-manual-ios-sdk`\n - `react-native-modal-progress-bar`\n - `react-native-module-arge`\n - `react-native-module-for-testing`\n - `react-native-moosa-lib-for-test`\n - `react-native-multi-bluetooth-printer`\n - `react-native-multiplier-altroncoso`\n - `react-native-multiplier-component`\n - `react-native-multiplier-demo`\n - `react-native-multiplier2`\n - `react-native-multiply`\n - `react-native-multiply-component`\n - `react-native-multiselector`\n - `react-native-mun-kit`\n - `react-native-my-first-try-arun-ramya`\n - `react-native-native-audio-engine`\n - `react-native-native-ios-test1`\n - `react-native-nativewind`\n - `react-native-nghia-sharering`\n - `react-native-nice-learning`\n - `react-native-nyx-printer`\n - `react-native-offline-notice`\n - `react-native-onramp`\n - `react-native-opus`\n - `react-native-otp-custom-library`\n - `react-native-paynow-generator`\n - `react-native-payu-payment`\n - `react-native-payu-payment-testing`\n - `react-native-plugpag-wrapper`\n - `react-native-progress-arrow`\n - `react-native-pulsator-native`\n - `react-native-rabbitmq-all`\n - `react-native-radio-bic-group-lib`\n - `react-native-reanimated-sortable-list`\n - `react-native-recent-framework-update`\n - `react-native-remote-update`\n - `react-native-responsive-helper`\n - `react-native-responsive-size`\n - `react-native-return-usb-data`\n - `react-native-rn-app`\n - `react-native-rn-common-components-example`\n - `react-native-rn-icons-library`\n - `react-native-rn-lib-custom-components`\n - `react-native-rn-tolkaplayer`\n - `react-native-rn-tolkaplayer-dharmesh`\n - `react-native-rom-components`\n - `react-native-rtn-ips-poslin-test`\n - `react-native-s-airlines`\n - `react-native-sandycomponent`\n - `react-native-savczuk-feature-library`\n - `react-native-sayhello-module`\n - `react-native-screen-idle-timer`\n - `react-native-scroll-tab-to-index`\n - `react-native-shared-gesture`\n - `react-native-sharing-intent`\n - `react-native-sherpa-onnx-offline-tts`\n - `react-native-simple-timeline`\n - `react-native-sp-test-common`\n - `react-native-sunmi-printer-hk`\n - `react-native-superapis-transbank-pos`\n - `react-native-syan-photo-picker`\n - `react-native-teads-sdk-module`\n - `react-native-tejab41097-sample-library`\n - `react-native-teknoctrl-components`\n - `react-native-test-comlibrary`\n - `react-native-test-module-hhh`\n - `react-native-test-multiplier-library`\n - `react-native-test-tooltip`\n - `react-native-test-view`\n - `react-native-ticker-tape`\n - `react-native-tilt-ble`\n - `react-native-tones`\n - `react-native-transtracker-library`\n - `react-native-uart-connection`\n - `react-native-ui-components-library`\n - `react-native-uvc-camera-android`\n - `react-native-vanguard-sdk`\n - `react-native-version-app`\n - `react-native-volume-phisical`\n - `react-native-withframework-check`\n - `react-native-wtf`\n - `react-native-xprinter-thermal-ble`\n - `react-native-ytximkit`\n - `reactnatively`\n - `reat-native-multiplierkpr`\n - `reddit-title-has-verbatim-quote`\n - `refinejs-repo`\n - `rn-adyen-dropin`\n - `rn-check-btn`\n - `rn-circular-chart`\n - `rn-counter-demo`\n - `rn-currency-formatter`\n - `rn-session-multiplier-demo`\n - `rn-tm-notify`\n - `rn_unique_device_id`\n - `rnttlock`\n - `scout-chatbot-widget`\n - `sedanbosok`\n - `semantic-release-gitee`\n - `semantic-release-gitlab-plugin`\n - `semantic-release-gitmoji-action`\n - `semantic-release-version`\n - `sm-versioning`\n - `smart_one_connect`\n - `styless-react`\n - `sungrow_tcu`\n - `tehmusimhujan`\n - `test-haptik-lib`\n - `test-library-123`\n - `test-zeo-collect`\n - `tria-prima`\n - `vantiq-react`\n - `vision-camera-base64-resized`\n - `vision-camera-plugin-face-detector`\n - `vision-camera-plugin-scan-faces`\n - `watch-env`\n - `wifi_configuration_package`\n - `winx-form-winx`\n - `yangtao-js`\n - `yarn-react-hook-form`\n - `zzzxxxyyy321123`\n\n\n\n\n\n\n\n\n\n\n\n## :scroll: License\n\n[MIT][license] © [Ionică Bizău][website]\n\n\n\n\n\n\n[license]: /LICENSE\n[website]: https://ionicabizau.net\n[contributing]: /CONTRIBUTING.md\n[docs]: /DOCUMENTATION.md\n[badge_patreon]: https://ionicabizau.github.io/badges/patreon.svg\n[badge_amazon]: https://ionicabizau.github.io/badges/amazon.svg\n[badge_paypal]: https://ionicabizau.github.io/badges/paypal.svg\n[badge_paypal_donate]: https://ionicabizau.github.io/badges/paypal_donate.svg\n[patreon]: https://www.patreon.com/ionicabizau\n[amazon]: http://amzn.eu/hRo9sIZ\n[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW\n","publish_time":1739495469504,"_cnpm_publish_time":1739495469504,"dist-tags":{"latest":"7.1.0"}}