{
  "manifest": {
    "name": "normalize-url",
    "version": "6.1.0",
    "description": "Normalize a URL",
    "license": "MIT",
    "repository": {
      "type": "git",
      "url": "https://github.com/sindresorhus/normalize-url.git"
    },
    "funding": "https://github.com/sponsors/sindresorhus",
    "author": {
      "name": "Sindre Sorhus",
      "email": "sindresorhus@gmail.com",
      "url": "https://sindresorhus.com"
    },
    "engines": {
      "node": ">=10"
    },
    "scripts": {
      "test": "xo && nyc ava && tsd"
    },
    "files": [
      "index.js",
      "index.d.ts"
    ],
    "keywords": [
      "normalize",
      "url",
      "uri",
      "address",
      "string",
      "normalization",
      "normalisation",
      "query",
      "querystring",
      "simplify",
      "strip",
      "trim",
      "canonical"
    ],
    "devDependencies": {
      "ava": "^2.4.0",
      "nyc": "^15.0.0",
      "tsd": "^0.11.0",
      "xo": "^0.25.3"
    },
    "nyc": {
      "reporter": [
        "text",
        "lcov"
      ]
    },
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-normalize-url-6.1.0-40d0885b535deffe3f3147bec877d05fe4c5668a-integrity/node_modules/normalize-url/package.json",
    "readmeFilename": "readme.md",
    "readme": "# normalize-url [![Coverage Status](https://codecov.io/gh/sindresorhus/normalize-url/branch/main/graph/badge.svg)](https://codecov.io/gh/sindresorhus/normalize-url)\n\n> [Normalize](https://en.wikipedia.org/wiki/URL_normalization) a URL\n\nUseful when you need to display, store, deduplicate, sort, compare, etc, URLs.\n\n## Install\n\n```\n$ npm install normalize-url\n```\n\n*If you need to use this in the browser, use version 4: `npm i normalize-url@4`*\n\n## Usage\n\n```js\nconst normalizeUrl = require('normalize-url');\n\nnormalizeUrl('sindresorhus.com');\n//=> 'http://sindresorhus.com'\n\nnormalizeUrl('//www.sindresorhus.com:80/../baz?b=bar&a=foo');\n//=> 'http://sindresorhus.com/baz?a=foo&b=bar'\n```\n\n## API\n\n### normalizeUrl(url, options?)\n\n#### url\n\nType: `string`\n\nURL to normalize, including [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs).\n\n#### options\n\nType: `object`\n\n##### defaultProtocol\n\nType: `string`\\\nDefault: `http:`\n\n##### normalizeProtocol\n\nType: `boolean`\\\nDefault: `true`\n\nPrepend `defaultProtocol` to the URL if it's protocol-relative.\n\n```js\nnormalizeUrl('//sindresorhus.com:80/');\n//=> 'http://sindresorhus.com'\n\nnormalizeUrl('//sindresorhus.com:80/', {normalizeProtocol: false});\n//=> '//sindresorhus.com'\n```\n\n##### forceHttp\n\nType: `boolean`\\\nDefault: `false`\n\nNormalize `https:` to `http:`.\n\n```js\nnormalizeUrl('https://sindresorhus.com:80/');\n//=> 'https://sindresorhus.com'\n\nnormalizeUrl('https://sindresorhus.com:80/', {forceHttp: true});\n//=> 'http://sindresorhus.com'\n```\n\n##### forceHttps\n\nType: `boolean`\\\nDefault: `false`\n\nNormalize `http:` to `https:`.\n\n```js\nnormalizeUrl('https://sindresorhus.com:80/');\n//=> 'https://sindresorhus.com'\n\nnormalizeUrl('http://sindresorhus.com:80/', {forceHttps: true});\n//=> 'https://sindresorhus.com'\n```\n\nThis option can't be used with the `forceHttp` option at the same time.\n\n##### stripAuthentication\n\nType: `boolean`\\\nDefault: `true`\n\nStrip the [authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) part of the URL.\n\n```js\nnormalizeUrl('user:password@sindresorhus.com');\n//=> 'https://sindresorhus.com'\n\nnormalizeUrl('user:password@sindresorhus.com', {stripAuthentication: false});\n//=> 'https://user:password@sindresorhus.com'\n```\n\n##### stripHash\n\nType: `boolean`\\\nDefault: `false`\n\nStrip the hash part of the URL.\n\n```js\nnormalizeUrl('sindresorhus.com/about.html#contact');\n//=> 'http://sindresorhus.com/about.html#contact'\n\nnormalizeUrl('sindresorhus.com/about.html#contact', {stripHash: true});\n//=> 'http://sindresorhus.com/about.html'\n```\n\n##### stripProtocol\n\nType: `boolean`\\\nDefault: `false`\n\nRemove HTTP(S) protocol from the URL: `http://sindresorhus.com` → `sindresorhus.com`.\n\n```js\nnormalizeUrl('https://sindresorhus.com');\n//=> 'https://sindresorhus.com'\n\nnormalizeUrl('https://sindresorhus.com', {stripProtocol: true});\n//=> 'sindresorhus.com'\n```\n\n##### stripTextFragment\n\nType: `boolean`\\\nDefault: `true`\n\nStrip the [text fragment](https://web.dev/text-fragments/) part of the URL.\n\n**Note:** The text fragment will always be removed if the `stripHash` option is set to `true`, as the hash contains the text fragment.\n\n```js\nnormalizeUrl('http://sindresorhus.com/about.html#:~:text=hello');\n//=> 'http://sindresorhus.com/about.html#'\n\nnormalizeUrl('http://sindresorhus.com/about.html#section:~:text=hello');\n//=> 'http://sindresorhus.com/about.html#section'\n\nnormalizeUrl('http://sindresorhus.com/about.html#:~:text=hello', {stripTextFragment: false});\n//=> 'http://sindresorhus.com/about.html#:~:text=hello'\n\nnormalizeUrl('http://sindresorhus.com/about.html#section:~:text=hello', {stripTextFragment: false});\n//=> 'http://sindresorhus.com/about.html#section:~:text=hello'\n```\n\n##### stripWWW\n\nType: `boolean`\\\nDefault: `true`\n\nRemove `www.` from the URL.\n\n```js\nnormalizeUrl('http://www.sindresorhus.com');\n//=> 'http://sindresorhus.com'\n\nnormalizeUrl('http://www.sindresorhus.com', {stripWWW: false});\n//=> 'http://www.sindresorhus.com'\n```\n\n##### removeQueryParameters\n\nType: `Array<RegExp | string> | boolean`\\\nDefault: `[/^utm_\\w+/i]`\n\nRemove query parameters that matches any of the provided strings or regexes.\n\n```js\nnormalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', {\n\tremoveQueryParameters: ['ref']\n});\n//=> 'http://sindresorhus.com/?foo=bar'\n```\n\nIf a boolean is provided, `true` will remove all the query parameters.\n\n```js\nnormalizeUrl('www.sindresorhus.com?foo=bar', {\n\tremoveQueryParameters: true\n});\n//=> 'http://sindresorhus.com'\n```\n\n`false` will not remove any query parameter.\n\n```js\nnormalizeUrl('www.sindresorhus.com?foo=bar&utm_medium=test&ref=test_ref', {\n\tremoveQueryParameters: false\n});\n//=> 'http://www.sindresorhus.com/?foo=bar&ref=test_ref&utm_medium=test'\n```\n\n##### removeTrailingSlash\n\nType: `boolean`\\\nDefault: `true`\n\nRemove trailing slash.\n\n**Note:** Trailing slash is always removed if the URL doesn't have a pathname unless the `removeSingleSlash` option is set to `false`.\n\n```js\nnormalizeUrl('http://sindresorhus.com/redirect/');\n//=> 'http://sindresorhus.com/redirect'\n\nnormalizeUrl('http://sindresorhus.com/redirect/', {removeTrailingSlash: false});\n//=> 'http://sindresorhus.com/redirect/'\n\nnormalizeUrl('http://sindresorhus.com/', {removeTrailingSlash: false});\n//=> 'http://sindresorhus.com'\n```\n\n##### removeSingleSlash\n\nType: `boolean`\\\nDefault: `true`\n\nRemove a sole `/` pathname in the output. This option is independant of `removeTrailingSlash`.\n\n```js\nnormalizeUrl('https://sindresorhus.com/');\n//=> 'https://sindresorhus.com'\n\nnormalizeUrl('https://sindresorhus.com/', {removeSingleSlash: false});\n//=> 'https://sindresorhus.com/'\n```\n\n\n##### removeDirectoryIndex\n\nType: `boolean | Array<RegExp | string>`\\\nDefault: `false`\n\nRemoves the default directory index file from path that matches any of the provided strings or regexes. When `true`, the regex `/^index\\.[a-z]+$/` is used.\n\n```js\nnormalizeUrl('www.sindresorhus.com/foo/default.php', {\n\tremoveDirectoryIndex: [/^default\\.[a-z]+$/]\n});\n//=> 'http://sindresorhus.com/foo'\n```\n\n##### sortQueryParameters\n\nType: `boolean`\\\nDefault: `true`\n\nSorts the query parameters alphabetically by key.\n\n```js\nnormalizeUrl('www.sindresorhus.com?b=two&a=one&c=three', {\n\tsortQueryParameters: false\n});\n//=> 'http://sindresorhus.com/?b=two&a=one&c=three'\n```\n\n## Related\n\n- [compare-urls](https://github.com/sindresorhus/compare-urls) - Compare URLs by first normalizing them\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-normalize-url?utm_source=npm-normalize-url&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n",
    "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz",
    "hash": "40d0885b535deffe3f3147bec877d05fe4c5668a",
    "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
    "registry": "npm",
    "packageName": "normalize-url",
    "cacheIntegrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== sha1-QNCIW1Nd7/4/MUe+yHfQX+TFZoo="
  },
  "registry": "npm",
  "hash": "40d0885b535deffe3f3147bec877d05fe4c5668a"
}