Skip to content

Commit

Permalink
docs: Add how to import module to usage examples (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealDolos authored and jhnns committed Oct 19, 2018
1 parent bcc24e2 commit 228c90b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Usage
------------------------------------------------------------------------

```javascript

// import the module
const parseDomain = require("parse-domain");

// long subdomains can be handled
expect(parseDomain("some.subdomain.example.co.uk")).to.eql({
subdomain: "some.subdomain",
Expand Down

0 comments on commit 228c90b

Please sign in to comment.