Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created July 23, 2014 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/2e247e4a4f87d7bba5cc to your computer and use it in GitHub Desktop.
Save tmcw/2e247e4a4f87d7bba5cc to your computer and use it in GitHub Desktop.
> require('url').parse('http://foo.com/?a=1?b=2', { query: true })
{ protocol: 'http:',
slashes: true,
auth: null,
host: 'foo.com',
port: null,
hostname: 'foo.com',
hash: null,
search: '?a=1?b=2',
query: { a: '1?b=2' },
pathname: '/',
path: '/?a=1?b=2',
href: 'http://foo.com/?a=1?b=2' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment