Created
September 12, 2010 09:05
-
-
Save jed/575954 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("url").parse("//google.com"); | |
// { href: '//google.com' | |
// , pathname: '//google.com' | |
// } |
thanks, isaacs. sorry to bug ya with that.
No worries ,its fair. I wrote the module after all ;)
(oh, and if you're hitting the docs, it's the third parameter, since the second is for the querystring...)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pass true as the second arg. Since the common use case is parsing req.url, where //foo is a normal path, we decided to make that the default behavior. I should doc that though, my bad.