Rocky_Mountain_Vending/.pnpm-store/v10/files/79/c80e4c9073d00d6668effcdf6ec5676e140765d33870ee6c8e2d9282096fcedc45776754b4118b30b4132471754de0db88103d4c175316d0a0f2870348d0c1
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

31 lines
801 B
Text

/**
* https://tc39.es/ecma402/#sec-getstringorbooleanoption
* @param opts
* @param prop
* @param values
* @param trueValue
* @param falsyValue
* @param fallback
*/
import { ToString } from './262';
export function GetStringOrBooleanOption(opts, prop, values, trueValue, falsyValue, fallback) {
var value = opts[prop];
if (value === undefined) {
return fallback;
}
if (value === true) {
return trueValue;
}
var valueBoolean = Boolean(value);
if (valueBoolean === false) {
return falsyValue;
}
value = ToString(value);
if (value === 'true' || value === 'false') {
return fallback;
}
if ((values || []).indexOf(value) === -1) {
throw new RangeError("Invalid value ".concat(value));
}
return value;
}