Created
December 23, 2019 14:04
-
-
Save zavr-1/22ad4192075b8289b0044b970a6c94fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get subdomains() { | |
const offset = this.app.subdomainOffset; // no | |
const hostname = this.hostname; // no | |
if (net.isIP(hostname)) return []; // no | |
return hostname | |
.split('.') | |
.reverse() | |
.slice(offset); // no | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment