{"id":22374879,"url":"https://github.com/qubitproducts/url-canon","last_synced_at":"2025-03-26T17:33:18.968Z","repository":{"id":25871871,"uuid":"29312012","full_name":"QubitProducts/url-canon","owner":"QubitProducts","description":"Normalizes URL's to prevent duplicates that point to the same server resource","archived":false,"fork":false,"pushed_at":"2016-08-24T14:57:34.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-01-31T22:49:29.971Z","etag":null,"topics":["ceh","cmh","implement"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QubitProducts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-15T18:38:31.000Z","updated_at":"2023-06-02T12:07:57.000Z","dependencies_parsed_at":"2022-07-24T07:31:50.658Z","dependency_job_id":null,"html_url":"https://github.com/QubitProducts/url-canon","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Furl-canon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Furl-canon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Furl-canon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Furl-canon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QubitProducts","download_url":"https://codeload.github.com/QubitProducts/url-canon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245702441,"owners_count":20658617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ceh","cmh","implement"],"created_at":"2024-12-04T21:18:49.652Z","updated_at":"2025-03-26T17:33:18.938Z","avatar_url":"https://github.com/QubitProducts.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![url-canon](https://cloud.githubusercontent.com/assets/823104/6485788/0f8784ae-c27e-11e4-9ba5-be08bb7cc852.png)\n\nNormalizes URL's to prevent duplicates that point to the same server resource.\n\n```javascript\nvar urlCanon = require('url-canon')\nurlCanon('http://www.google.com/?b=hey\u0026a=yo\u0026#')\n// =\u003e returns 'http://www.google.com/?\u0026a=yo\u0026b=hey'\n```\n\n## Installation\n```bash\nnpm install url-canon\n```\n\n## Features\n\n* Sorts query parameters into alphabetical order\n* Decodes needlessly percent-encoded ASCII\n* Removes default ports for http/https\n* Lowercases the protocol and hostname\n* Removes trailing `#` and `?`\n* Uppercases percent encoded bytes\n\n## Compatibility\n\nTests pass in\n* IE8+\n* Chrome\n* Firefox\n* Opera\n\nDoes not support Node.js (as it uses an anchor element for parsing).\n\n## Known issues\n\nInternationalised URLs such as `http://見.香港/` are converted to punycode form in Chrome but not in Firefox and IE. Conversely punycode such as `http://xn--nw2a.xn--j6w193g/` is decoded automatically in Firefox and IE to `http://見.香港/`. It is very hard to standardise these URLs and they have not been handled.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqubitproducts%2Furl-canon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqubitproducts%2Furl-canon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqubitproducts%2Furl-canon/lists"}