4 ms·
Show HN: Query-Params.js
- cjsturgess 6y agoI know it's not much, but I made a very small, simple tool that fetches the query parameters passed to a web page and makes them available under window.location.query. I found myself reusing this a lot for different projects and thought that I'd share. :)
- cjsturgess 6y agoFeel free to do with it whatever you'd like. I figured since it helps me out, it might help you out!
- Nijikokun 6y agoDoes it support PHP query format? foo[bar]=x&foo[bar]=y
- cjsturgess 6y agoIt doesn't currently, but that's absolutely something I'll add.
- cjsturgess 6y agoJust updated to support arrays, so {foo[bar]: ["x", "y"]}. Working on splitting foo[bar] represent foo.bar