Rocky_Mountain_Vending/.pnpm-store/v10/files/84/6bb17071b8050b27dc9c05113cb74ac84055c83a33758a70747770932c78c1779ed0e3c7ce11c130ce8d15b32d8f24862ab00b6dabce5dc12bce7d5640a7fc
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

1 line
No EOL
1.1 KiB
Text

{"version":3,"file":"parseSampleRate.js","sources":["../../../src/utils/parseSampleRate.ts"],"sourcesContent":["/**\n * Parse a sample rate from a given value.\n * This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).\n * If a string is passed, we try to convert it to a number.\n *\n * Any invalid sample rate will return `undefined`.\n */\nexport function parseSampleRate(sampleRate: unknown): number | undefined {\n if (typeof sampleRate === 'boolean') {\n return Number(sampleRate);\n }\n\n const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;\n if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {\n return undefined;\n }\n\n return rate;\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,eAAe,CAAC,UAAU,EAA+B;AACzE,EAAE,IAAI,OAAO,UAAA,KAAe,SAAS,EAAE;AACvC,IAAI,OAAO,MAAM,CAAC,UAAU,CAAC;AAC7B;;AAEA,EAAE,MAAM,IAAA,GAAO,OAAO,UAAA,KAAe,QAAA,GAAW,UAAU,CAAC,UAAU,CAAA,GAAI,UAAU;AACnF,EAAE,IAAI,OAAO,SAAS,QAAA,IAAY,KAAK,CAAC,IAAI,CAAA,IAAK,OAAO,CAAA,IAAK,IAAA,GAAO,CAAC,EAAE;AACvE,IAAI,OAAO,SAAS;AACpB;;AAEA,EAAE,OAAO,IAAI;AACb;;;;"}