{"id":15497146,"url":"https://github.com/brunobernardino/shurley","last_synced_at":"2025-04-22T21:32:33.510Z","repository":{"id":43962218,"uuid":"231963146","full_name":"BrunoBernardino/shurley","owner":"BrunoBernardino","description":"I'll give you the right URL, but don't call me Shirley!","archived":false,"fork":false,"pushed_at":"2025-02-02T14:27:33.000Z","size":66,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T08:46:18.644Z","etag":null,"topics":["deno","javascript","jsr","npm","package","typescript","url-parser"],"latest_commit_sha":null,"homepage":"https://jsr.io/@brn/shurley","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BrunoBernardino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["BrunoBernardino"],"custom":["https://paypal.me/brunobernardino","https://gist.github.com/BrunoBernardino/ff5b54c13dd96ac7f9fee6fbfd825b09"]}},"created_at":"2020-01-05T19:07:15.000Z","updated_at":"2025-02-24T16:54:16.000Z","dependencies_parsed_at":"2022-09-26T17:01:22.953Z","dependency_job_id":"6b04b7bb-4dc8-4e82-8ecf-e277afe984cf","html_url":"https://github.com/BrunoBernardino/shurley","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoBernardino%2Fshurley","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoBernardino%2Fshurley/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoBernardino%2Fshurley/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrunoBernardino%2Fshurley/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrunoBernardino","download_url":"https://codeload.github.com/BrunoBernardino/shurley/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250328775,"owners_count":21412684,"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":["deno","javascript","jsr","npm","package","typescript","url-parser"],"created_at":"2024-10-02T08:31:02.146Z","updated_at":"2025-04-22T21:32:33.468Z","avatar_url":"https://github.com/BrunoBernardino.png","language":"TypeScript","funding_links":["https://github.com/sponsors/BrunoBernardino","https://paypal.me/brunobernardino","https://gist.github.com/BrunoBernardino/ff5b54c13dd96ac7f9fee6fbfd825b09"],"categories":[],"sub_categories":[],"readme":"# Shurley\n\n[![](https://github.com/BrunoBernardino/shurley/workflows/Run%20Tests/badge.svg)](https://github.com/BrunoBernardino/shurley/actions?workflow=Run+Tests) [![deno](https://shield.deno.dev/x/shurley)](https://deno.land/x/shurley) [![npm](https://img.shields.io/npm/v/shurley.svg)](https://www.npmjs.com/package/shurley) [![jsr](https://jsr.io/badges/@brn/shurley)](https://jsr.io/@brn/shurley)\n\n\u003e I'll give you the right URL, but [don't call me Shirley!](https://www.youtube.com/watch?v=ixljWVyPby0)\n\nParses URLs from user input (with potential typos in protocols, bad copy+paste, etc.) and returns a proper URL.\n\nIt has no dependencies, and it's meant to be this simple.\n\n### Some things to note:\n\n1. It doesn't check if the URL exists, you can do that in many different ways.\n\n2. It assumes only `http` and `https` protocols for URLs.\n\n3. If there's a \"mistake\" in the URL protocol, it defaults to `https`.\n\n## Usage\n\nIt only has a _single method_: `parse(url: string)` which returns the same string, parsed.\n\n### Deno\n\n```ts\nimport shurley from 'jsr:@brn/shurley@1.0.9'; // or import shurley from 'https://deno.land/x/shurley@1.0.9/mod.ts';\n\nconst parsedUrl = shurley.parse('example.com');\n\nconsole.log(parsedUrl); // Outputs 'https://example.com'\n```\n\n### Node/NPM\n\n```bash\nnpm install --save-exact shurley\n```\n\n```js\nconst shurley = require('shurley'); // or import shurley from 'shurley';\n\nconst parsedUrl = shurley.parse('example.com');\n\nconsole.log(parsedUrl); // Outputs 'https://example.com'\n```\n\n## Development\n\nRequires `deno`.\n\n```bash\nmake format\nmake test\n```\n\n## Publishing\n\nAfter committing and pushing with a new version in `deno.json`, just run `make publish`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunobernardino%2Fshurley","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrunobernardino%2Fshurley","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunobernardino%2Fshurley/lists"}