Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created January 14, 2011 18:52
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/780037 to your computer and use it in GitHub Desktop.
Save tmcw/780037 to your computer and use it in GitHub Desktop.
~⇾ node --version
v0.3.4
~⇾ node
> var url = require('url');
> url.parse('http://localhost/blah');
{ href: 'http://localhost/blah',
protocol: 'http:',
slashes: true,
host: 'localhost',
hostname: 'localhost',
pathname: '/blah' }
> url.parse('file://localhost/blah');
{ href: 'file://localhost/blah',
protocol: 'file:',
pathname: '//localhost/blah' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment