• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / blurts-server / #13406

pending completion
#13406

push

circleci

web-flow
Update src/utils/subscriber.js

Co-authored-by: Vincent <Vinnl@users.noreply.github.com>

282 of 1774 branches covered (15.9%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

959 of 4683 relevant lines covered (20.48%)

1.71 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/utils/subscriber.js
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4

5
import AppConstants from '../appConstants.js'
6

7
const {
8
  FXA_SUBSCRIPTION_ENABLED,
9
  FXA_SUBSCRIPTION_KEY
10
} = AppConstants
×
11

12
/**
13
 * Checks if a user has a subscription.
14
 *
15
 * @param {FxaProfile | undefined} fxaProfile The FxA profile object
16
 * @returns {boolean} true if the user is subscribed
17
 */
18
function isSubscribed (fxaProfile) {
19
  if (!FXA_SUBSCRIPTION_ENABLED) { return false }
×
20

21
  return fxaProfile?.subscriptions?.includes(FXA_SUBSCRIPTION_KEY) ?? false
×
22
}
23

24
export { isSubscribed }
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc