{"id":21592951,"url":"https://github.com/jonabrams/parsedurl","last_synced_at":"2025-10-11T07:39:50.971Z","repository":{"id":4831332,"uuid":"5985334","full_name":"JonAbrams/ParsedURL","owner":"JonAbrams","description":"A JavaScript library for parsing/constructing HTTP/HTTPS URL's","archived":false,"fork":false,"pushed_at":"2017-04-21T20:37:47.000Z","size":8,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T10:50:02.587Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"TestingWithFrank/Shelley","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JonAbrams.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":"2012-09-27T16:48:11.000Z","updated_at":"2024-02-21T13:02:54.000Z","dependencies_parsed_at":"2022-07-21T13:18:22.995Z","dependency_job_id":null,"html_url":"https://github.com/JonAbrams/ParsedURL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JonAbrams/ParsedURL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonAbrams%2FParsedURL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonAbrams%2FParsedURL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonAbrams%2FParsedURL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonAbrams%2FParsedURL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonAbrams","download_url":"https://codeload.github.com/JonAbrams/ParsedURL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonAbrams%2FParsedURL/sbom","scorecard":{"id":73972,"data":{"date":"2025-08-11","repo":{"name":"github.com/JonAbrams/ParsedURL","commit":"9cf0910464efedab3888c0d6c748313eb8e2bda3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/17 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T04:25:51.691Z","repository_id":4831332,"created_at":"2025-08-15T04:25:51.692Z","updated_at":"2025-08-15T04:25:51.692Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006626,"owners_count":26084131,"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-10-11T02:00:06.511Z","response_time":55,"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":[],"created_at":"2024-11-24T17:10:37.444Z","updated_at":"2025-10-11T07:39:50.953Z","avatar_url":"https://github.com/JonAbrams.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ParsedURL\n\nA simple JavaScript class/library for parsing/manipulating http URL's.\n\nIt's especially helpful when you want to easily change a URL's components such as its parameters, hostname, or path while leaving the rest of it intact.\n\n# How to use it\n\nJust download and include parsedURL.js with your web page:\n\n    \u003cscript src=\"/js/ParsedURL.js\"\u003e\u003c/script\u003e\n\nor install via npm:\n\n    npm install parsedurl\n\nWhen using Node, in your app:\n\n    var ParseURL = require('parsedurl');\n\nThen when you have a URL you need to parse just create a new ParsedURL object:\n\n    var url = \"https://a.complex-url.com:8080/users/jon/messages?q=cake\u0026when=recent#searchbox\"\";\n    var purl = new ParsedURL(url);\n\n### Getting the URL string\n\nYou can always get the URL back as a string by asking for it:\n\n    var newUrl = purl.toString();\n    // newUrl is now \"https://a.complex-url.com:8080/users/jon/messages?q=cake\u0026when=recent#searchbox\"\n\nor by using type coercion:\n\n    var newUrl = \"\" + purl;\n    // newUrl is now \"https://a.complex-url.com:8080/users/jon/messages?q=cake\u0026when=recent#searchbox\"\n\n### Hostname and scheme/protocol\n\nIf you need the hostname, get it:\n\n    var hostname = purl.hostname;\n\nOr the scheme/protocol:\n\n    var scheme = purl.scheme;\n\nIf you want to change the hostname (or scheme), just set it:\n\n    purl.hostname = \"a.different-url.com\";\n\n### Port\n\nYou can get/set the port as you would the hostname, but note that it will be a number, not a string.\n\nFor example:\n\n    console.log(purl.toString());\n    purl.port++;\n    console.log(purl.toString());\n\nOutputs:\n\n    https://a.complex-url.com:8080/users/jon/messages?q=pie\u0026when=recent#searchbox\n\n    https://a.complex-url.com:8081/users/jon/messages?q=pie\u0026when=recent#searchbox\n\n### URL path\n\nThe URL's path can be be accessed or changed the same way you would the hostname:\n\n    var path = purl.path;\n    console.log(path);\n    purl.path = path.replace(\"jon\", \"tim\");\n    console.log(purl.toString());\n\nOutputs:\n\n    /users/jon/messages\n    https://a.complex-url.com:8080/users/tim/messages?q=cake\u0026when=recent#searchbox\n\nIf you want to get the path parsed into an array:\n\n    var pathDirectories = purl.parsedPath();\n    for (var i = 0; i \u003c pathDirectories.length; i++) {\n      console.log(pathDirectories[i]);\n    }\n\nOutputs:\n\n    users\n    tim\n    messages\n\n### URL parameters\n\nAll of the URL's parameters are parsed and placed into the params attribute as an object literal.\n\nFor example:\n\n    // Print out all URL parameters + values\n    for (var paramName in purl.params) {\n      console.log(paramName + \" = \" + purl.params[paramName]);\n    }\n\n    // Change the q parameter from \"cake\" to \"pie\"\n    purl.params.q = \"pie\";\n    console.log(purl.toString())\n\nPrints out:\n\n    q = cake\n    when = recent\n    https://a.complex-url.com:8080/users/jon/messages?q=pie\u0026when=recent#searchbox\n\n### Hash\n\nYou can get/set the way you would guess by now:\n\n    var hash = purl.hash;\n    console.log(hash);\n\nOutputs:\n\n    searchbox\n\n## Demonstration/Tests\n\n[Here's a jsbin](http://jsbin.com/anabuy/14/edit) using Angluar.js to ouput the components from a bunch of URL's.\n\n## License\n\nUse it for anything you want, as long as it is for good and not evil.\n\n## Credit\n\nCreated by [Jon Abrams](http://about.me/JonAbrams) - [Twitter](http://twitter.com/JonathanAbrams) - [Github](http://github.com/JonAbrams)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonabrams%2Fparsedurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonabrams%2Fparsedurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonabrams%2Fparsedurl/lists"}