MCPcopy Create free account
hub / github.com/codecombat/codecombat / basicSubscriptionForCurrentUser

Function basicSubscriptionForCurrentUser

app/core/store/modules/products.js:56–65  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

54 },
55
56 basicSubscriptionForCurrentUser (state) {
57 if (!Array.isArray(state.products) || state.products.length === 0) {
58 return undefined
59 }
60
61 const productsCollection = new Products()
62 productsCollection.add(state.products)
63
64 return productsCollection.getBasicSubscriptionForUser(window.me).toJSON()
65 },
66
67 basicAnnualSubscriptionForCurrentUser (state) {
68 if (!Array.isArray(state.products) || state.products.length === 0) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected