0.2.2 • Published 6 months ago

@flags-sdk/statsig v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Flags SDK — Statsig Provider

The Statsig provider for the Flags SDK contains support for Statsig's Feature Gates, Dynamic Config, Experiments, Autotune and Layers.

Setup

The Statsig provider is available in the @flags-sdk/statsig module. You can install it with

pnpm i @flags-sdk/statsig

Provider Instance

You can import the default adapter instance statigAdapter from @flags-sdk/statsig:

import { statsigAdapter } from '@flags-sdk/statsig';

Example

import { flag } from 'flags/next';
import { statsigAdapter } from '@flags-sdk/statsig';

export const marketingGate = flag<boolean>({
  key: 'marketing_gate',
  adapter: statsigAdapter.featureGate((config) => config.value),
});

Documentation

Please check out the Statsig provider documentation for more information.