summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/tldts-core/dist/es6/src/subdomain.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/tldts-core/dist/es6/src/subdomain.js')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/tldts-core/dist/es6/src/subdomain.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/tldts-core/dist/es6/src/subdomain.js b/bin/wiki/ImportarDesdeURL/node_modules/tldts-core/dist/es6/src/subdomain.js
new file mode 100644
index 00000000..43a08569
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/node_modules/tldts-core/dist/es6/src/subdomain.js
@@ -0,0 +1,11 @@
+/**
+ * Returns the subdomain of a hostname string
+ */
+export default function getSubdomain(hostname, domain) {
+ // If `hostname` and `domain` are the same, then there is no sub-domain
+ if (domain.length === hostname.length) {
+ return '';
+ }
+ return hostname.slice(0, -domain.length - 1);
+}
+//# sourceMappingURL=subdomain.js.map \ No newline at end of file