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>
14 lines
531 B
Text
14 lines
531 B
Text
export var SelectorType;
|
|
(function (SelectorType) {
|
|
SelectorType["ENV"] = "env";
|
|
SelectorType["CONFIG"] = "shared config entry";
|
|
})(SelectorType || (SelectorType = {}));
|
|
export const stringUnionSelector = (obj, key, union, type) => {
|
|
if (!(key in obj))
|
|
return undefined;
|
|
const value = obj[key].toUpperCase();
|
|
if (!Object.values(union).includes(value)) {
|
|
throw new TypeError(`Cannot load ${type} '${key}'. Expected one of ${Object.values(union)}, got '${obj[key]}'.`);
|
|
}
|
|
return value;
|
|
};
|