Rocky_Mountain_Vending/.pnpm-store/v10/files/91/51d0e2a13e933108df5d592e3a0d2cbed67559694d9effda15c3d2bd81ed7d61d74941e5ad52e7080f6b269e8025e9f6e06fe3e4be5f3297758e729212a536
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;;;;"}