Rocky_Mountain_Vending/.pnpm-store/v10/files/69/4f047615ee813732af79f6c2fb01039b66a9cec1ced472e4c1dd475c357108d2ebe55899af064aa04d488b7cc29e84ed2e46d5e2fcb66cb39140ccc76acd22
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

25 lines
681 B
Text

import { isValidHostLabel } from "@smithy/util-endpoints";
import { isIpAddress } from "../isIpAddress";
export const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
if (allowSubDomains) {
for (const label of value.split(".")) {
if (!isVirtualHostableS3Bucket(label)) {
return false;
}
}
return true;
}
if (!isValidHostLabel(value)) {
return false;
}
if (value.length < 3 || value.length > 63) {
return false;
}
if (value !== value.toLowerCase()) {
return false;
}
if (isIpAddress(value)) {
return false;
}
return true;
};