TrueCar / react-launch-darkly

Simple component helpers to support LaunchDarkly in your React app.
MIT License
76 stars 20 forks source link

Add functionality to get all feature flags for a user #4

Closed jacobmoretti closed 7 years ago

jacobmoretti commented 7 years ago

Adds and exposes a simple function for retrieving all feature flags for a user.

Usage may be along the lines of:

import { getAllFeatureFlags } from "react-launch-darkly";

....

export async function allFeatureFlags(launchDarklyClientKey, user) {
  const allFlags = await getAllFeatureFlags(launchDarklyClientKey, user);
  console.log(`allFlags: ${JSON.stringify(allFlags)}`);
  // Do something here with all the flags...
}
toddw commented 7 years ago

:+1: