get the domain from an url
for component:
$ component install ramitos/domain.js
for node.js:
$ npm install domain.js
with string url:
var domain = require('domain.js')
domain('http://www.example.co.uk') //=> example.co.uk
with parsed url:
var domain = require('domain.js'),
url = require('url')
domain(url.parse('http://www.example.co.uk')) //=> example.co.uk
$ npm test
- inspired by URI.js
MIT