Rocky_Mountain_Vending/.pnpm-store/v10/files/09/7d5c8f5f36769ec3d4d61c36329148115aa6283f1a5aafb60dab3711b6f9455e4a776625c66a992dec309a1e9c6ca2c33c965d31677948c46134eda0294f9a
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

24 lines
753 B
Text

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/**
* Parse a sample rate from a given value.
* This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).
* If a string is passed, we try to convert it to a number.
*
* Any invalid sample rate will return `undefined`.
*/
function parseSampleRate(sampleRate) {
if (typeof sampleRate === 'boolean') {
return Number(sampleRate);
}
const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;
if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {
return undefined;
}
return rate;
}
exports.parseSampleRate = parseSampleRate;
//# sourceMappingURL=parseSampleRate.js.map