{"id":18067639,"url":"https://github.com/alanclarke/smurl","last_synced_at":"2025-08-25T23:12:47.118Z","repository":{"id":32916295,"uuid":"36511642","full_name":"alanclarke/smurl","owner":"alanclarke","description":"smart url matching","archived":false,"fork":false,"pushed_at":"2023-04-16T14:30:08.000Z","size":1235,"stargazers_count":4,"open_issues_count":15,"forks_count":0,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-08-09T16:33:11.535Z","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/alanclarke.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,"governance":null}},"created_at":"2015-05-29T15:10:38.000Z","updated_at":"2023-07-26T14:27:38.000Z","dependencies_parsed_at":"2023-01-14T22:39:20.218Z","dependency_job_id":null,"html_url":"https://github.com/alanclarke/smurl","commit_stats":null,"previous_names":["qubitdigital/smurl","qubitproducts/smurl"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/alanclarke/smurl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanclarke%2Fsmurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanclarke%2Fsmurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanclarke%2Fsmurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanclarke%2Fsmurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alanclarke","download_url":"https://codeload.github.com/alanclarke/smurl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanclarke%2Fsmurl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272144684,"owners_count":24881147,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-31T07:09:57.722Z","updated_at":"2025-08-25T23:12:47.075Z","avatar_url":"https://github.com/alanclarke.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![smurl](https://cloud.githubusercontent.com/assets/640611/11503072/7901f55c-9836-11e5-9e5f-d3fdcd690b1d.png)\n\nsmart partial url matching for nodejs and the browser\n```\nnpm install smurl\n```\n```javascript\nvar match = require('smurl')\n\n// match on path\nmatch('https://www.domain.com/somepath?a=b\u0026b=c#blah', '/somepath') // true\nmatch('https://www.domain.com/anotherpath?a=b\u0026b=c#blah', '/somepath') // false\nmatch('https://www.domain.com/?a=b\u0026b=c#blah', '/') // true\n\n// match on querystring (order of querystring params does not matter)\nmatch('https://www.domain.com/?a=b\u0026b=c', '?b=c') // true\nmatch('https://www.domain.com/?a=b\u0026b=c', '?b=c\u0026a=b') // true\nmatch('https://www.domain.com/?a=b\u0026b=c\u0026c=d', '?b=c\u0026a=b') // true\nmatch('https://www.domain.com/?a=b', '?b=c') // false\n\n// match on hash\nmatch('https://www.domain.com/#a=b\u0026b=c', '#b=c') // true\nmatch('https://www.domain.com/#a=b\u0026b=c', '#b=c\u0026a=b') // true\nmatch('https://www.domain.com/#a=b\u0026b=c\u0026c=d', '#b=c\u0026a=b') // true\nmatch('https://www.domain.com/#a=b', '#b=c') // false\n\n// match on domain\nmatch('https://www.domain.com/blah?a=b#blah', 'www.domain.com') // true\n\n// match on domain and path\nmatch('https://www.domain.com/a', 'www.domain.com/a') // true\n\n// wildcard matching\nmatch('https://a.b.c.domain.com/blah?a=b#blah', '*.domain.com') // true\nmatch('https://www.domain.com/a/1234/b', 'www.domain.com/a/*/b') // true\nmatch('https://www.domain.com/a/b/file.js', 'www.domain.com/**.js') // true\n```\n\n```\nnpm test\n```\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\n\n\n## Want to work on this for your day job?\n\nThis project was created by the Engineering team at Qubit. As we use open source libraries, we make our projects public where possible.\n\nWe’re currently looking to grow our team, so if you’re a JavaScript engineer and keen on ES2016 React+Redux applications and Node micro services, why not get in touch? Work with like minded engineers in an environment that has fantastic perks, including an annual ski trip, yoga, a competitive foosball league, and copious amounts of yogurt.\n\nFind more details on our Engineering site. Don’t have an up to date CV? Just link us your Github profile! Better yet, send us a pull request that improves this project.`\nContact GitHub API Training Shop Blog About\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanclarke%2Fsmurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falanclarke%2Fsmurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanclarke%2Fsmurl/lists"}