websanova / js-url

url() - A simple, lightweight url parser for JavaScript
http://www.websanova.com
MIT License
1.93k stars 204 forks source link

An undefined anchor should return null rather than empty string #14

Closed regisd closed 11 years ago

regisd commented 11 years ago

From exemple http://rob:abcd1234@www.example.com/path/index.html?query1=test&silly=willy#test=hash&chucky=cheese, I expected $url('#poo') == null rather than an empty string.

Otherwise, there is no mechanisme to distinguish http://exemple.com#foo and http://exemple.com

websanova commented 11 years ago

Updated, thanks.