(plan: string | null | undefined)
| 63 | * `'pro'` => 4000 credits ($20 at 1:200), `'team'` => 8000 credits ($40 at 1:200). |
| 64 | */ |
| 65 | export function getPlanTierCredits(plan: string | null | undefined): number { |
| 66 | if (!plan) return 0 |
| 67 | const match = plan.match(/_(\d+)$/) |
| 68 | if (match) return Number.parseInt(match[1], 10) |
| 69 | if (plan === 'pro') return 4000 |
| 70 | if (plan === 'team') return 8000 |
| 71 | return 0 |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Get the dollar value of a plan's credit tier. |
no outgoing calls
no test coverage detected