Sha256: 82261d7e31d277709a382a3adbb99a07e503536bcdcec2333bc4aae0ff4f2ff9
Contents?: true
Size: 346 Bytes
Versions: 26
Compression:
Stored size: 346 Bytes
Contents
/** * 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
Version data entries
26 entries across 26 versions & 1 rubygems