Rocky_Mountain_Vending/.pnpm-store/v10/files/6c/e31f66b3c1d9ba4ed02560a60808242edfbb5df1639501c0403817c7f7f1930e66742b3adec92196364273489b270bfe6d3f308580297dbe25a4cc1dc506a0
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

11 lines
322 B
Text

/**
* Returns the subdomain of a hostname string
*/
export default function getSubdomain(hostname: string, domain: string): string {
// 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);
}