Skip to content

Commit

Permalink
Add documentation and simplify #init signature
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Parisot committed Feb 13, 2017
1 parent 8b6565b commit 5f8d3f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,19 @@ const tldjs = require('tldjs');
tldjs.getDomain('localhost'); // returns null
tldjs.getSubdomain('vhost.localhost'); // returns null

<<<<<<< HEAD
const myTldjs = tldjs.fromUserSettings({
validHosts: ['localhost']
});

myTldjs.getDomain('localhost'); // returns 'localhost'
myTldjs.getSubdomain('vhost.localhost'); // returns 'vhost'
=======
var customTld = tld.init(['localhost']);

customTld.getDomain('localhost'); // returns 'localhost'
customTld.getSubdomain('vhost.localhost'); // returns 'vhost'
>>>>>>> Add documentation and simplify #init signature
```

## Updating the TLDs List
Expand Down

0 comments on commit 5f8d3f0

Please sign in to comment.