Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to get feature toggle

Hierarchy

  • FeatureToggleService

Index

Constructors

  • Create instance of FeatureToggleService

    @example
    const ftService = new FeatureToggleService();

    Returns FeatureToggleService

Properties

GET_FT_URL: string = '/config/toggledFeatures'
auth: CXoneAuth
features?: string[]
featuresRequest: Promise<string[]> = ...
logger: Logger = ...
utilService: HttpUtilService = ...

Accessors

  • Method to create singleton object of the class

    @example
    const ftService = FeatureToggleService.instance;

    Returns FeatureToggleService

Methods

  • getFeatureToggle(featureName: string): Promise<boolean>
  • Method to get feature toggle by Name

    @example
    getFeatureToggle('featureToggleName');

    Parameters

    • featureName: string

    Returns Promise<boolean>

  • getFeatureToggleSync(featureName: string): boolean
  • Method to get feature toggle

    @example
    getFeatureToggleSync('featureToggleName')

    Parameters

    • featureName: string

    Returns boolean

  • loadFeatures(): Promise<string[]>
  • Method to load features

    @example
    loadFeatures()

    Returns Promise<string[]>

  • sendGetToggledFeaturesRequest(): Promise<string[]>
  • Method to get feature toggle by API call

    @example
    sendGetToggledFeaturesRequest()

    Returns Promise<string[]>

Generated using TypeDoc