Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
11 lines
No EOL
346 B
Text
11 lines
No EOL
346 B
Text
/**
|
|
* 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 |