Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Query-Params.js (github.com)
1 point by cjsturgess 9 days ago | hide | past | favorite | 5 comments





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. :)

Feel free to do with it whatever you'd like. I figured since it helps me out, it might help you out!

Does it support PHP query format?

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


It doesn't currently, but that's absolutely something I'll add.

Just updated to support arrays, so {foo[bar]: ["x", "y"]}. Working on splitting foo[bar] represent foo.bar



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: