You can obtainan a client of FeatureProbe, which provides access to all of the SDK's functionality.

Hierarchy

  • TinyEmitter
    • FeatureProbe

Constructors

  • Parameters

    Returns FeatureProbe

Properties

_clientSdkKey: any
_eventRecorder: any
_eventsUrl: any
_getEventsUrl: any
_readyPromise: any
_realtimePath: any
_realtimeUrl: any
_refreshInterval: any
_status: any
_storage: any
_timeoutInterval: any
_timeoutTimer?: any
_timer?: any
_toggles: any
_togglesUrl: any
_user: any
connectSocket: any
errorInitialized: any
fetchToggles: any
successInitialized: any
toggleDetail: any
toggleValue: any

Accessors

  • get clientSdkKey(): string
  • Returns string

  • get eventRecorder(): EventRecorder
  • Returns EventRecorder

  • get eventsUrl(): string
  • Returns string

  • get user(): FPUser
  • Returns FPUser

Methods

  • Returns an object of all available toggles' details to the current user.

    Returns undefined | {
        [key: string]: FPDetail;
    }

  • Determines the return boolean value of a toggle for the current user, along with information about how it was calculated.

    Parameters

    • key: string

      The unique key of the toggle.

    • defaultValue: boolean

      The default value of the toggle, to be used if the value is not available from FeatureProbe.

    Returns FPDetail

  • Determines the return boolean value of a toggle for the current user.

    Parameters

    • key: string

      The unique key of the toggle.

    • defaultValue: boolean

      The default value of the toggle, to be used if the value is not available from FeatureProbe.

    Returns boolean

  • Parameters

    • event: string
    • Rest ...args: any[]

    Returns FeatureProbe

  • Manually push events.

    Returns void

  • Returns the current user.

    This is the user that was most recently passed to identifyUser, or, if identifyUser has never been called, the initial user specified when the client was created.

    Returns FPUser

  • Changing the current user to FeatureProbe.

    Parameters

    • user: FPUser

      A new FPUser instance.

    Returns void

  • Determines the return json value of a toggle for the current user, along with information about how it was calculated.

    Parameters

    • key: string

      The unique key of the toggle.

    • defaultValue: Record<string, unknown>

      The default value of the toggle, to be used if the value is not available from FeatureProbe.

    Returns FPDetail

  • Determines the return json value of a toggle for the current user.

    Parameters

    • key: string

      The unique key of the toggle.

    • defaultValue: Record<string, unknown>

      The default value of the toggle, to be used if the value is not available from FeatureProbe.

    Returns Record<string, unknown>

  • Logout the current user, change the current user to an anonymous user.

    Returns void

  • Determines the return number value of a toggle for the current user, along with information about how it was calculated.

    Parameters

    • key: string

      The unique key of the toggle.

    • defaultValue: number

      The default value of the toggle, to be used if the value is not available from FeatureProbe.

    Returns FPDetail

  • Determines the return number value of a toggle for the current user.

    Parameters

    • key: string

      The unique key of the toggle.

    • defaultValue: number

      The default value of the toggle, to be used if the value is not available from FeatureProbe.

    Returns number

  • Parameters

    • event: string
    • Optional callback: Function

    Returns FeatureProbe

  • Parameters

    • event: string
    • callback: Function
    • Optional ctx: any

    Returns FeatureProbe

  • Parameters

    • event: string
    • callback: Function
    • Optional ctx: any

    Returns FeatureProbe

  • Start the FeatureProbe client.

    Returns Promise<void>

  • Stop the FeatureProbe client, once the client has been stopped, SDK will no longer listen for toggle changes or send metrics to Server.

    Returns void

  • Determines the return string value of a toggle for the current user, along with information about how it was calculated.

    Parameters

    • key: string

      The unique key of the toggle.

    • defaultValue: string

      The default value of the toggle, to be used if the value is not available from FeatureProbe.

    Returns FPDetail

  • Determines the return string value of a toggle for the current user.

    Parameters

    • key: string

      The unique key of the toggle.

    • defaultValue: string

      The default value of the toggle, to be used if the value is not available from FeatureProbe.

    Returns string

  • Record custom events, value is optional.

    Parameters

    • name: string
    • Optional value: unknown

    Returns void

  • Returns a Promise which tracks the client's ready state.

    The Promise will be resolved if the client successfully get toggles from the server or ejected if client error get toggles from the server until timeoutInterval countdown reaches.

    Returns Promise<void>

  • Parameters

    • toggles: {
          [key: string]: boolean;
      }
      • [key: string]: boolean

    Returns FeatureProbe

Generated using TypeDoc