Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As others have suggested, jQuery is overkill for this.

The best lightweight js library I've found/used in the past is parseUri:

http://blog.stevenlevithan.com/archives/parseuri

Obviously, if you only need to analyze the current URL, you can use window/document.location, but there are times when you want to parse a URI for a page you aren't on. For instance, if you are analyzing har data, and want to break URI "components" into columns so they are sortable.



I have a hard time seeing why, these days, an extra 1.2k for something that makes a task simpler and more consistent is ever "overkill".


jQuery is not 1.2k.

And this library doesn't have a strong reason to tie itself to jQuery. It doesn't need jQuery's DOM operation or AJAX. It's like making a program depending on third party library without actually using any of the feature.


Or rather it's using the jquery namespace for a utility function much like many of those provided by jquery, like isnuneric for example.


It uses just one function from jQuery, `isNumeric`, which is a function that is a one liner.

And if you follow the project again, you will see that it has become a regular non-jQuery library.




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

Search: