A collection of attributes that can affect toggle evaluation, usually corresponding to a user of your application.

Hierarchy

  • FPUser

Constructors

Properties

Accessors

Methods

Constructors

  • Creates a new FPUser.

    Parameters

    • Optional stableRollout: string

      sets user with a unique id for percentage rollout, by default, a timestamp will be assigned as the key

    Returns FPUser

Properties

_attrs: {
    [key: string]: string;
}

Type declaration

  • [key: string]: string
_key: string

Accessors

  • get attrs(): {
        [key: string]: string;
    }
  • Gets a copy of the user's attributions (custom values).

    Returns {
        [key: string]: string;
    }

    • [key: string]: string
  • get key(): string
  • Gets the key of user.

    The key may be manually defined for stableRollout, or auto generated (timestamp).

    Returns string

Methods

  • Adds multiple attributes to the user.

    Returns

    the FPUser

    Parameters

    • attrs: {
          [key: string]: string;
      }

      a map of attributions

      • [key: string]: string

    Returns FPUser

  • Parameters

    • attrName: string

    Returns undefined | string

  • Sets user with a unique id for percentage rollout.

    Parameters

    • key: string

      user unique id for percentage rollout

    Returns FPUser

  • Adds an attribute to the user.

    Returns

    the FPUser

    Parameters

    • attrName: string

      attribute name

    • attrValue: string

      attribute value

    Returns FPUser

Generated using TypeDoc