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

get the domain from an url

Notifications You must be signed in to change notification settings

sergioramos/domain.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

get the domain from an url

Resources

Stars

Watchers

Forks

Packages

No packages published