Javascript SDKs for Hackle
    Preparing search index...

    Class default

    Implements

    • default
    Index

    Constructors

    • Parameters

      • core: HackleCore
      • synchronizer: PollingSynchronizer
      • hackleUserResolver: HackleUserResolver

      Returns default

    Methods

    • Determine the variation to expose to the user for experiment.

      This method return the {"A"} if:

      • The experiment key is invalid
      • The experiment has not started yet
      • The user is not allocated to the experiment
      • The determined variation has been dropped

      Parameters

      • experimentKey: number

        the unique key of the experiment.

      • user: string | User

        the user to participate in the experiment. MUST NOT be null.

      • defaultVariation: string = "A"

        the default variation of the experiment.

      Returns string

      string the decided variation for the user, or the default variation.

    • Determine the variation to expose to the user for experiment, and returns an object that describes the way the variation was determined.

      Parameters

      • experimentKey: number

        the unique key of the experiment.

      • user: string | User

        the user to participate in the experiment. MUST NOT be null. (e.g. { id: "userId"} )

      • defaultVariation: string = "A"

        the default variation of the experiment. MUST NOT be null.

      Returns Decision

      object

    • Determine whether the feature is turned on to the user.

      Parameters

      • featureKey: number

        the unique key for the feature.

      • user: string | User

        the user requesting the feature.

      Returns boolean

      boolean True if the feature is on. False if the feature is off.

      2.0.0

    • Determine whether the feature is turned on to the user, and returns an object that describes the way the value was determined.

      Parameters

      • featureKey: number

        the unique key for the feature.

      • user: string | User

        the identifier of user.

      Returns FeatureFlagDecision

      2.0.0

    • Records the event that occurred by the user.

      Parameters

      • event: string | HackleEvent<string>

        the unique key of the event that occurred. MUST NOT be null.

      • user: string | User

        the user that occurred the event. MUST NOT be null.

      Returns void

    • Returns a instance of Hackle Remote Config.

      Parameters

      • user: User

        the identifier of user.

      Returns HackleRemoteConfig

    • Updates the user's properties.

      Parameters

      • operations: PropertyOperations

        Property operations to update user properties.

      • user: User

        the user whose properties will be updated

      Returns void

    • Parameters

      • operations: HackleSubscriptionOperations
      • user: User

      Returns void

    • Parameters

      • operations: HackleSubscriptionOperations
      • user: User

      Returns void

    • Parameters

      • operations: HackleSubscriptionOperations
      • user: User

      Returns void

    • Parameters

      • experimentKey: number

      Returns HackleExperiment

    • Parameters

      • block: () => void

        callback function.

      • timeout: number = DEFAULT_ON_READY_TIMEOUT

      Returns void

      use onInitialized instead.

    • Parameters

      • Optionalconfig: { timeout?: number }

      Returns Promise<{ success: boolean }>

    • Returns void