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

get the subdomain from a url

Notifications You must be signed in to change notification settings

sergioramos/subdomain.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

subdomain.js

get the subdomain from an url

installation

for component:

$ component install ramitos/subdomain.js

for node.js:

$ npm install subdomain.js

usage

with string url:

var subdomain = require('subdomain.js')

subdomain('http://www.example.co.uk') //=> www

with parsed url:

var subdomain = require('subdomain.js'),
    url = require('url')

subdomain(url.parse('http://www.example.co.uk')) //=> www

test Build Status

$ npm test

credits

license

MIT

About

get the subdomain from a url

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages