{"repo":"paoloricciuti/sveltekit-search-params","free":true,"listed":false,"github":"https://github.com/paoloricciuti/sveltekit-search-params","clone":"git clone https://github.com/paoloricciuti/sveltekit-search-params.git","description":"The easiest way to read and WRITE from query parameters in sveltekit.","language":"TypeScript","stars":665,"topics":["query-params","search-params","svelte","svelte-store","svelte-stores","sveltekit","hacktoberfest"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"sveltekit-search-params The fastest way to read AND WRITE from query search params in sveltekit. Warning This package is meant to be used with Svelte-Kit as the name suggest. Because it uses api that are only present in Svelte-Kit it will not work in your normal svelte project. Contributing Contributions are always welcome! For the moment there's no contributing guidelines but if you found a problem or have an idea feel free to open an issue Function changes intended for release should include a changeset If you want the fastest way to open a PR try out Codeflow Authors - @paoloricciuti Installation Install sveltekit-search-params with npm Usage/Examples Simple case To start using the library you can import the method queryParameters . You can invoke this method without arguments to get an object containing all the present search params. assuming the page is /?framework=svelte&isCool=true the above code will show by default all query parameters are string. Writing to the store Reading query parameters is cool but you know what is even cooler? Writing query parameters! With this library you can treat your query parameters just like normal state in svelte. To update the state and consequently the url you can just do this Expecting some parameters Most of the times if you need to read from query parameters you are expecting some parameters to be present. You can define the parameters you are expecting during the initial invocation and those will be merged with the actual query p","default_branch":null,"files":null,"tree":[],"storefront":"/r/paoloricciuti","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/paoloricciuti/sveltekit-search-params/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}