Skip to content

Instantly share code, notes, and snippets.

@saifsmailbox98
Last active July 7, 2017 16:09
Show Gist options
  • Save saifsmailbox98/d4e3bc5a0a6b403337d49dba6e473e7d to your computer and use it in GitHub Desktop.
Save saifsmailbox98/d4e3bc5a0a6b403337d49dba6e473e7d to your computer and use it in GitHub Desktop.

$ node -pe "require('url').parse('/test?q=1', true)"

Url {
  protocol: null,
  slashes: null,
  auth: null,
  host: null,
  port: null,
  hostname: null,
  hash: null,
  search: '?q=1',
  query: { q: '1' },
  pathname: '/test',
  path: '/test?q=1',
  href: '/test?q=1' 
  }
@saifsmailbox98
Copy link
Author

pexels-photo-197935

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment