Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Latest commit

 

History

History
44 lines (25 loc) · 732 Bytes

readme.md

File metadata and controls

44 lines (25 loc) · 732 Bytes

domain.js

get the domain from an url

installation

for component:

$ component install ramitos/domain.js

for node.js:

$ npm install domain.js

usage

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

test Build Status

$ npm test

credits

license

MIT