News for hackers. Stuff that matters.
Re:Show HN: Query-Params.js by cjsturgess on Tuesday June 30, 2020 @04:19PM (#23694321)
I 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. :)
Re:Show HN: Query-Params.js by cjsturgess on Tuesday June 30, 2020 @04:20PM (#23694330)
Feel free to do with it whatever you'd like. I figured since it helps me out, it might help you out!
Re:Show HN: Query-Params.js by Nijikokun on Tuesday June 30, 2020 @04:57PM (#23694686)
Does it support PHP query format?

foo[bar]=x&foo[bar]=y

Re:Show HN: Query-Params.js by cjsturgess on Tuesday June 30, 2020 @07:44PM (#23696139)
It doesn't currently, but that's absolutely something I'll add.
Re:Show HN: Query-Params.js by cjsturgess on Tuesday June 30, 2020 @08:01PM (#23696244)
Just updated to support arrays, so {foo[bar]: ["x", "y"]}. Working on splitting foo[bar] represent foo.bar