{"id":15612462,"url":"https://github.com/kylefox/jquery-querystring","last_synced_at":"2025-04-28T16:23:50.711Z","repository":{"id":66575077,"uuid":"1610046","full_name":"kylefox/jquery-querystring","owner":"kylefox","description":"A jQuery plugin to make working with querystrings a breeze","archived":false,"fork":false,"pushed_at":"2014-11-02T19:24:05.000Z","size":191,"stargazers_count":41,"open_issues_count":2,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-18T18:33:10.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/kylefox.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":"2011-04-13T16:01:24.000Z","updated_at":"2022-06-05T02:23:41.000Z","dependencies_parsed_at":"2023-02-20T12:15:51.467Z","dependency_job_id":null,"html_url":"https://github.com/kylefox/jquery-querystring","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2Fjquery-querystring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2Fjquery-querystring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2Fjquery-querystring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2Fjquery-querystring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylefox","download_url":"https://codeload.github.com/kylefox/jquery-querystring/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251343458,"owners_count":21574368,"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":[],"created_at":"2024-10-03T06:43:09.647Z","updated_at":"2025-04-28T16:23:50.694Z","avatar_url":"https://github.com/kylefox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This plugin attempts to make working with querystrings easier. The primary function exposed is `$.querystring`, which handles both parsing \u0026 serialization (depending on the type of argument passed in). A `$.fn.querystring` method is also provided, which makes getting \u0026 setting the querystring of `\u003ca\u003e` elements more convenient.\n\n_Currently only the simplest cases work, but the goal is to support nested objects and arrays. Please refer to the test suite for more info._\n\nBasic usage\n-----------\n\nObjects can be serialized to a querystring fragment:\n\n    $.querystring({name: \"John\", age:42}); // \"name=John\u0026age=42\"\n\nConversely, querystring fragments can be parsed back into objects:\n\n    $.querystring(\"name=John\u0026age=42\"); // {name: \"John\", age:42}\n\nElement methods\n---------------\n\nYou can access an element's querystring directly:\n\n    // Markup: \u003ca href=\"/search?terms=bicycles\"\u003eSearch for bikes!\u003c/a\u003e\n    $('a').querystring(); // {terms: 'bicycles'}\n    \nand modify it, too:\n\n    $('a').querystring({perPage: 10});\n    // \u003ca href=\"/search?terms=bicycles\u0026perPage=10\"\u003eSearch for bikes!\u003c/a\u003e\n    \nYou'll notice the new parameter was merged into the existing querystring. You can optionally pass a second argument (boolean) indicating if the existing querystring should be cleared:\n    \n    $('a').querystring({foo: 'bar'}, true);\n    // \u003ca href=\"/search?foo=bar\"\u003eSearch for bikes!\u003c/a\u003e\n    \nYou can also use this to remove the querystring:\n\n    $('a').querystring({}, true);\n    \n_Right now only `\u003ca\u003e` tags are supported, but support for `\u003cform\u003e` tags is planned._\n    \nSyntax\n------\n    \nThe syntax for objects and arrays is similar to that of [Rack](http://rack.rubyforge.org/). For example, an object like this:\n\n    {person: {name: \"Johnny\"}}\n    \nequates to a string like this:\n\n    \"person[name]=Johnny\"\n\nArrays are similar:\n\n    {drinks: [\"Whisky\", \"Beer\", \"Wine\"]}\n    \nequates to:\n\n    \"drinks[]=Whisky\u0026drinks[]=Beer\u0026drinks[]=Wine\"\n\nTests \u0026 Contributing\n--------------------\n\nTesting is done with [QUnit](http://docs.jquery.com/Qunit). Have a look at [tests/tests.js](https://github.com/kylefox/jquery-querystring/blob/master/tests/tests.js) to learn more about the intended API. Running the tests (ie, opening `tests/index.html` in your browser) will give you an idea of which features remain to be implemented \u0026 clarified.\n\nI would love help with this plugin, so please fork \u0026 submit pull requests. Here's an immediate hit-list of things to implement:\n\n* Parsing \u0026 serialization of nested objects \u0026 arrays\n* Coercion to native types (ex: Number, Boolean)\n* Handling of blank/empty values\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylefox%2Fjquery-querystring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylefox%2Fjquery-querystring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylefox%2Fjquery-querystring/lists"}