Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
This repository was archived by the owner on May 30, 2024. It is now read-only.

Offline flags should be undefined, not null #57

Description

@ericclemmons

This way, you can take advantage of default args for clean defaults:

constdefaultFlags={"testing": "Oy! I use this when testing!",};ldClient.all_flags(user,(err,flags=defaultFlags)=>err ? reject(err) : resolve(flags));

Alternatively, support:

constldClient=newLaunchDarkly.init(process.env.LAUNCHDARKLY_TOKEN,{offline: process.env.NODE_ENV==="test" ? { ... } : false,});

But that would conflict with the .variation(...) default value signature, so...nah.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions