{"id":47146495,"url":"https://github.com/npx-bin/js-queryparams","last_synced_at":"2026-03-13T00:33:36.309Z","repository":{"id":57283507,"uuid":"320196459","full_name":"npx-bin/js-queryparams","owner":"npx-bin","description":"A JavaScript library to retrieve the query parameters with cross browser compatibility.","archived":false,"fork":false,"pushed_at":"2021-06-27T07:53:41.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T10:04:57.784Z","etag":null,"topics":["js-queryparams","parameters","params","query","queryparameters","queryparams"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/js-queryparams","language":"JavaScript","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/npx-bin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-10T07:41:13.000Z","updated_at":"2021-06-27T07:53:05.000Z","dependencies_parsed_at":"2022-09-05T00:41:28.199Z","dependency_job_id":null,"html_url":"https://github.com/npx-bin/js-queryparams","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/npx-bin/js-queryparams","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npx-bin%2Fjs-queryparams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npx-bin%2Fjs-queryparams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npx-bin%2Fjs-queryparams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npx-bin%2Fjs-queryparams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npx-bin","download_url":"https://codeload.github.com/npx-bin/js-queryparams/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npx-bin%2Fjs-queryparams/sbom","scorecard":{"id":696569,"data":{"date":"2025-08-11","repo":{"name":"github.com/npx-bin/js-queryparams","commit":"e0bfe7211443e42b8ab1ab8d686cf2d05f3415b5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/1 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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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"}}]},"last_synced_at":"2025-08-22T03:53:03.596Z","repository_id":57283507,"created_at":"2025-08-22T03:53:03.597Z","updated_at":"2025-08-22T03:53:03.597Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30451629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T21:31:01.033Z","status":"ssl_error","status_checked_at":"2026-03-12T21:30:43.161Z","response_time":114,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["js-queryparams","parameters","params","query","queryparameters","queryparams"],"created_at":"2026-03-13T00:33:35.530Z","updated_at":"2026-03-13T00:33:36.289Z","avatar_url":"https://github.com/npx-bin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cb\u003ejs-queryparams\u003c/b\u003e\n\n### \u003ci\u003eA JavaScript library to retrieve the query parameters with cross-browser support.\u003c/i\u003e\n\n---\n\u003cbr/\u003e\n\n## How to Install:\nInside your project, run the following command:\n```\nnpm i js-queryparams\n```\nThe above command will install the js-queryparams module inside the node_modules folder. After this you can either directly refer to the `node_modules/js-queryparams/lib/index.js` file from within your webpage or extract it and host it in your webserver.\n\n---\n\u003cbr/\u003e\n\n## Usage:  \nAssume the current browser url is:  \n\n```\nhttps://www.example.com/?p1=v1\u0026p2=some=text\u0026p3={\"key1\":\"val1\",\"key2\":[1,2,3,4]}\u0026p4=v4\u0026p4=a4\u0026p4=\u0026p5=https://www.example.com\u0026p6=https%3A%2F%2Fwww.example.com%2F%3Fabc%3Ddef%26pqr%3Dxyz\u0026p7=test=01\u0026p8\u0026p9=v9#somehash\n```\n\u003cbr/\u003e\n\n### The library has the following functions:\n\u003cbr/\u003e\n\u003cb\u003eGet a specific query parameter:\u003c/b\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n```\nqueryParams.get(\u003cparamName\u003e);\n\ne.g.:\nqueryParams.get(\"p1\"); // --\u003e \"v1\" i.e. a single value.\nqueryParams.get(\"p4\"); // --\u003e [\"v4\", \"a4\", \"\"] i.e. an Array of values, if the parameter gets repeated in the query string.\n```\n\n\u003cbr/\u003e\n\u003cb\u003eGet all the query parameters:\u003c/b\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n```\nqueryParams.getAll() \n\n// Output: \n\n{\n    \"p1\": \"v1\",\n    \"p2\": \"some=text\",\n    \"p3\": \"{\\\"key1\\\":\\\"val1\\\",\\\"key2\\\":[1,2,3,4]}\",\n    \"p4\": [\n        \"v4\",\n        \"a4\",\n        \"\"\n    ],\n    \"p5\": \"https://www.example.com\",\n    \"p6\": \"https://www.example.com/?abc=def\u0026pqr=xyz\",\n    \"p7\": \"test=01\",\n    \"p8\": \"\",\n    \"p9\": \"v9\"\n}\n```\n\n\u003cbr/\u003e\n\u003cb\u003eSupport for custom url:\u003c/b\u003e\n\nThe `queryParams.get` and `queryParams.getAll` functions also support an optional argument to specify a url. \n\u003cbr/\u003e\n\u003cbr/\u003e\n\n```\nqueryParams.getAll(\"https://www.example.com/?p1=v1\u0026p2=v2\")\n\n// Output: \n\n{\n    \"p1\": \"v1\",\n    \"p2\": \"v2\"\n}\n\nqueryParams.get(\"p2\", \"https://www.example.com/?p1=v1\u0026p2=v2\")\n\n// Output:\n\n\"v2\"\n```\n\n\u003cbr/\u003e\n\u003cb\u003eChange the reference \"queryParams\":\u003c/b\u003e\n\nIn case the reference `queryParams` needs to be changed, then it can be done as follows:\n\n```\n// queryParams.changeRef(\u003cnewRefName\u003e);\n\n// e.g.:\nqueryParams.changeRef(\"$qp\");\nconsole.log(queryParams); // --\u003e ReferenceError\n\n// use $qp instead of queryParams\n$qp.get(\"p1\"); // --\u003e \"v1\"\n```\nOnce the reference is changed, the old reference is deleted, so trying to use it will result in a ReferenceError.\n\n---\n\u003cbr/\u003e\n\n## License: MIT (https://mit-license.kcak11.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpx-bin%2Fjs-queryparams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpx-bin%2Fjs-queryparams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpx-bin%2Fjs-queryparams/lists"}