Skip to content

Method to check if a flag exists #791

Open
@eyalroth

Description

@eyalroth

Is your feature request related to a problem? Please describe.
I would love to have the ability to check with the SDK whether a feature flag exists or not, so I won't try to get its .variation() and receive an error.

Describe the solution you'd like
A method on LDClient with this signature:

export function isFlagExists(key: string): boolean

(I'm not sure whether this is an async function or not, depends on the implementation)

Describe alternatives you've considered
Use allFlagsState() method.

Additional context
Was also requested here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureLabel for feature requestspackage: sdk/server-nodeLabel for issues affecting the sdk/server-node package.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions