Skip to content

Feature request: support Date objects as traits #329

@rolodato

Description

@rolodato

OpenFeature supports Datetime types for context attributes, but Flagsmith traits do not.

Because of this, the OpenFeature provider has to make a copy of all the traits and map any Date objects into strings, which we've added in open-feature/js-sdk-contrib#1351. The OpenFeature provider could potentially have some smarter logic/caching to avoid this copying, but this is overkill for what should be a simple adapter on top of the Flagsmith SDK.

Ideally, the Flagsmith SDK should natively support Date objects, and only serialise them into strings when needed. This avoids having to make a copy of the entire evaluation context whenever it changes, and makes the OpenFeature provider implementation simpler and faster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions