Skip to content

basalt / subscriptions/src / loadPlans

Function: loadPlans() ​

> loadPlans(store): Promise<Plans>

Defined in: subscriptions/src/plan-store.ts:37

Build a Plans catalog from a store — call at boot and pass the result to subscriptionsPlugin({ plans }).

ts
const plans = await loadPlans(planStore)
subscriptionsPlugin({ plans, fallbackPlan: 'free', ...stores })

Parameters ​

store ​

PlanStore

Returns ​

Promise<Plans>

Released under the MIT License.