Class: Rollout

Rollout(props)

Represents a rollout class that checks if a client qualifies for a rollout based on provided parameters.

Constructor

new Rollout(props)

Constructs a new Rollout instance.

Parameters:
Name Type Description
props Object

The properties for the Rollout instance.

Properties
Name Type Attributes Default Description
percentage number

The rollout percentage.

seed string

The rollout seed to use with every hash.

direction string <optional>
DIRECTION_UP

The rollout direction.

totalBuckets number <optional>
DEFAULT_TOTAL_BUCKETS

The total number of buckets.

Source:
Throws:

Throws an error if the rollout percentage is not defined or not a number.

Type
Error

Methods

(async) identifierQualifies(clientIdentifier) → {Object}

Checks if a client's identifier qualifies for the rollout.

Parameters:
Name Type Description
clientIdentifier string

The client identifier.

Properties:
Name Type Description
isQualified boolean

Whether the client qualifies or not.

hashedIdentifier string

The hashed client identifier.

clientBucket number

The bucket value.

Source:
Returns:
  • An object containing the qualification result.
Type
Object