[4.3.0] - 2018-08-27
Added:
- The new
LDClient
methodallFlagsState()
should be used instead ofallFlags()
if you are passing flag data to the front end for use with the JavaScript SDK. It preserves some flag metadata that the front end requires in order to send analytics events correctly. Versions 2.5.0 and above of the JavaScript SDK are able to use this metadata, but the output ofallFlagsState()
will still work with older versions. - The
allFlagsState()
method also allows you to select only client-side-enabled flags to pass to the front end, by using the optionFlagsStateOption.CLIENT_SIDE_ONLY
. (#112) - The new
LDClient
methodsboolVariationDetail
,intVariationDetail
,doubleVariationDetail
,stringVariationDetail
, andjsonVariationDetail
allow you to evaluate a feature flag (using the same parameters as you would forboolVariation
, etc.) and receive more information about how the value was calculated. This information is returned in anEvaluationDetail
object, which contains both the result value and anEvaluationReason
which will tell you, for instance, if the user was individually targeted for the flag or was matched by one of the flag's rules, or if the flag returned the default value due to an error.
Fixed:
- Fixed a bug in
LDUser.Builder
that would throw an exception if you initialized the builder by copying an existing user, and then tried to add a custom attribute.
Deprecated:
LDClient.allFlags()