Get Flipper Service

The FlipperService handles the flipper switches of the current customer in Suite. It can tell whether a flipper is enabled for the customer. Calling the getter function will return a promise that will be resolved with the service.

It works in iframes as well, but the UI Kit and window.e.config must be present on top window, otherwise the promise won't resolve.

Usage

Name Description
window.e.utils.v2.config.getFlipperService() Return an object that has isOn, isOff methods.

Method Reference

Name Description
isOn Return true if the flipper turned on.
isOff Return true if the flipper turned off.

Example

const flipperService = await window.e.utils.v2.config.getFlipperService();

if (flipperService.isOn('myFlipper')) {
  console.log('myFlipper is on');
}