It's been a while so we finally decided to rewrite an old goody to add some more features. The new version of url.js comes for both web and Node.js. It comes with some new features including proper tld
and sub
domain support. Also support for array parameters. Even with all the new features we managed to make the file size even smaller.
List of changes here:
url-tld.min.js
and url.min.js
.url('[]')
now returns entire parsed object for url.url('?')
now returns all query parameters as an object.url('query')
url('#')
now returns all hash parameters as an object.url('hash')
tld
, domain
and sub
arguments are all disabled for the non tld version.tld
, domain
and sub
now return appropriate values (if tld matches).url('/1')
or just url(1)
for fetching path parts.url('/')
will return all path parts as an array.url('.')
will return all domain parts as an array.As always, we hope you enjoy.