Skip to content

Commit

Permalink
Add isLocalhost helper to the Url class
Browse files Browse the repository at this point in the history
  • Loading branch information
negativetwelve committed Sep 29, 2017
1 parent c7ca939 commit d2d696a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/handy-url/src/Url.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ class Url {
// --------------------------------------------------
// Host / Hostname
// --------------------------------------------------
get isLocalhost() {
return this.domain === 'localhost';
}

get hostname() {
return this.parsed.hostname;
}
Expand Down

0 comments on commit d2d696a

Please sign in to comment.