JavaScript feature flags libraries

Updated Nov 2026

JavaScript feature flag libraries turn features on or off for each user at runtime without a new deploy. A flag evaluation combines the flag's targeting rules with attributes of the current user or request. These libraries run gradual rollouts, A/B tests, and kill switches in web apps and backend services.

Popularity

OpenFeature server SDK has the most monthly downloads in this comparison, at 26.4M.

LibraryMonthly downloadsStarsLast releaseLicense
OpenFeature server SDK
26.4M
289Jul 2026Apache-2.0
@statsig/js-client
16.7M
18Nov 2026ISC
LaunchDarkly Node.js
14.3M
28Nov 2026Apache-2.0
Flags SDK
7.4M
630Nov 2026MIT
GrowthBook
6.0M
8.6KNov 2026MIT
Unleash Node.js
3.9M
226Sep 2026Apache-2.0
Split JavaScript SDK
2.3M
49Oct 2026Apache-2.0
Optimizely JavaScript SDK
1.8M
82Nov 2026Apache-2.0
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

OpenFeature server SDK

Provides one flag evaluation API that works with many flag providers.

Downloads / mo
26.4M
Stars
289
Last release
1.23.0
License
Apache-2.0

Strengths

  • Changes providers behind one API. Keep evaluation calls while replacing the feature flag backend.
  • Propagates request context. Attach targeting attributes once for a transaction's downstream evaluations.

Limitations

  • Needs a flag provider. An unconfigured client returns fallback values until a provider is registered.
  • Provider events vary. Check provider support before relying on configuration-change notifications.
$ npm install @openfeature/server-sdk@1.23.0
import { OpenFeature, InMemoryProvider } from "@openfeature/server-sdk";
await OpenFeature.setProviderAndWait(new InMemoryProvider({
  "new-ui": { disabled: false, defaultVariant: "on", variants: { on: true, off: false } },
}));
const client = OpenFeature.getClient("example");
console.log(await client.getBooleanValue("new-ui", false));

OpenFeature server SDK examples

From open-source projects on GitHub

@statsig/js-client

Checks feature gates, dynamic configs, and experiments for one user in browser and React apps.

Downloads / mo
16.7M
Stars
18
Last release
3.33.8
License
ISC

Strengths

  • Client keys can ship in the app. The client SDK key is designed to be embedded in browser code.

Limitations

  • Values can come from the cache. Await initializeAsync when a check needs the latest values.

Quickstart

From Statsig docs
$ npm install @statsig/js-client@3.33.8
import { StatsigClient } from "@statsig/js-client";
const client = new StatsigClient("client-YOUR_CLIENT_KEY", { userID: "user-1" });
await client.initializeAsync();
console.log(client.checkGate("new-ui"));

LaunchDarkly Node.js

Evaluates feature flags for multi-user Node.js server applications.

Downloads / mo
14.3M
Stars
28
Last release
9.16.7
License
Apache-2.0

Strengths

  • Evaluates multi-user contexts. Use one server client to evaluate flags for different users.
  • Returns evaluation details. Use variationDetail to inspect the factors behind a flag result.

Limitations

  • Requires a shared server client. Create one client per project instead of one per request.
  • Shutdown needs an event flush. Call flush before close to send pending analytics events.

Quickstart

From Node.js SDK docs
$ npm install @launchdarkly/node-server-sdk@9.16.7
import { init } from "@launchdarkly/node-server-sdk";
const client = init("YOUR_SERVER_SDK_KEY");
await client.waitForInitialization({ timeout: 5 });
console.log(await client.variation("new-ui", { kind: "user", key: "user-1" }, false));
client.close();

Declares feature flags as functions that Next.js pages, components, and middleware call.

Downloads / mo
7.4M
Stars
630
Last release
4.4.1
License
MIT

Strengths

  • Works with any flag provider. Each flag's decide function can call a flag provider or custom logic.

Quickstart

From Flags SDK docs
$ npm install flags@4.4.1
import { flag } from "flags/next";
const showNewUI = flag({ key: "new-ui", decide: () => true });
export default async function Page() {
  return <p>{String(await showNewUI())}</p>;
}

Flags SDK examples

From open-source projects on GitHub

Evaluates feature flags and runs experiments in JavaScript.

Downloads / mo
6.0M
Stars
8.6K
Last release
2.2.0
License
MIT

Strengths

  • Shares one server client. Pass separate user contexts to a shared GrowthBookClient.
  • Explains assigned feature values. Use evalFeature to inspect why a user received a value.

Limitations

  • Initialization failures need handling. Unloaded features evaluate to null after failed downloads.
  • Targeting checks types strictly. Match attribute types exactly; string IDs and numeric IDs differ.

Quickstart

From JavaScript SDK docs
$ npm install @growthbook/growthbook@2.2.0
import { GrowthBook } from "@growthbook/growthbook";
const gb = new GrowthBook({ apiHost: "https://cdn.growthbook.io", clientKey: "sdk-YOUR_CLIENT_KEY", attributes: { id: "user-1" } });
await gb.init({ timeout: 3000 });
console.log(gb.isOn("new-ui"));

GrowthBook examples

From open-source projects on GitHub

Unleash Node.js

Evaluates feature flags locally in Node.js against configurations fetched from Unleash or Unleash Edge.

Downloads / mo
3.9M
Stars
226
Last release
6.12.2
License
Apache-2.0

Strengths

  • Open source or enterprise backend. The same SDK connects to Unleash Open Source or Unleash Enterprise.

Limitations

  • Flags read false until synced. Bootstrap a configuration or wait for synchronization before relying on flag values.

Quickstart

From Node SDK docs
$ npm install unleash-client@6.12.2
import { startUnleash } from "unleash-client";
const client = await startUnleash({ url: "https://YOUR_UNLEASH_HOST/api/", appName: "example", customHeaders: { Authorization: "YOUR_SERVER_API_TOKEN" } });
console.log(client.isEnabled("new-ui", { userId: "user-1" }));
client.destroy();

Split JavaScript SDK

Evaluates Split feature flags in Node.js and in web browsers from one isomorphic library.

Downloads / mo
2.3M
Stars
49
Last release
11.12.1
License
Apache-2.0

Limitations

  • Old browsers need polyfills. Add Promise, Map, and Set polyfills for browsers without native support.

Quickstart

From README.md
$ npm install @splitsoftware/splitio@11.12.1
import { SplitFactory } from "@splitsoftware/splitio";
const client = SplitFactory({ core: { authorizationKey: "YOUR_SERVER_SDK_KEY" } }).client();
client.on(client.Event.SDK_READY, () => {
  console.log(client.getTreatment("user-1", "new-ui"));
});

Split JavaScript SDK examples

From open-source projects on GitHub

Optimizely JavaScript SDK

Runs feature flags and A/B tests from Optimizely Feature Experimentation in JavaScript and TypeScript.

Downloads / mo
1.8M
Stars
82
Last release
6.7.0
License
Apache-2.0

Strengths

  • Modular architecture. Each part of the client, such as event processing, is configured as a separate module.

Limitations

  • Upgrades change the API. Follow the migration guide when moving from an earlier major version.

Quickstart

From README.md
$ npm install @optimizely/optimizely-sdk@6.7.0
import { createInstance, createPollingProjectConfigManager, createBatchEventProcessor, createOdpManager } from "@optimizely/optimizely-sdk";
const client = createInstance({
  projectConfigManager: createPollingProjectConfigManager({ sdkKey: "YOUR_SDK_KEY" }),
  eventProcessor: createBatchEventProcessor(),
  odpManager: createOdpManager(),
});
try {
  await client.onReady();
  const user = client.createUserContext("user-1");
  console.log(user.decide("new-ui"));
} finally {
  await client.close();
}

FAQ

GrowthBook is an open source platform for feature flags, experimentation, and product analytics. Its JavaScript SDK evaluates flags and runs experiments in the browser and in Node.js.

OpenFeature defines one vendor-neutral API for evaluating feature flags. A provider connects that API to a commercial, open source, or in-house flag backend.

Unleash Node.js fetches flag configurations from Unleash or Unleash Edge and evaluates them locally against an Unleash context. Until the SDK synchronizes, every flag evaluates to false unless a bootstrapped configuration exists.

LaunchDarkly Node.js evaluates flags for many users inside a Node.js server application. The Statsig JavaScript client runs in the browser for one user, with gates, dynamic configs, and experiments.

A shared GrowthBookClient takes a separate userContext during flag evaluation. Request-scoped instances provide another way to carry the current request's context.

Network failures can leave default feature values without throwing. The initialization result reports success, source, and error; inspect them before relying on downloaded flags.

For coding agents

Found your feature flags library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official