MCPcopy Index your code
hub / github.com/simstudioai/sim / derivePlanView

Function derivePlanView

apps/sim/lib/billing/client/plan-view.ts:108–118  ·  view source on GitHub ↗
(plan: string | null | undefined)

Source from the content-addressed store, hash-verified

106
107/** Derive the shared plan view from a plan name. */
108export function derivePlanView(plan: string | null | undefined): PlanView {
109 const enterprise = isEnterprise(plan)
110 return {
111 tier: resolvePlanTier(plan),
112 isFree: isFree(plan),
113 isPaid: isPaid(plan),
114 isEnterprise: enterprise,
115 canAccessUpgrade: !enterprise,
116 showCredits: !enterprise,
117 }
118}

Callers 1

usePlanViewFunction · 0.90

Calls 4

isEnterpriseFunction · 0.90
isFreeFunction · 0.90
isPaidFunction · 0.90
resolvePlanTierFunction · 0.85

Tested by

no test coverage detected