1. Install the SDK
npm i tggl-client
2. Create the client
import { TgglClient } from 'tggl-client'
const client = new TgglClient('YOUR_API_KEY')
3. Start using feature flags
const flags = await client.evalContext({
userId: 'foo',
email: 'foo@gmail.com',
})
if (flags.get('my-feature', true)) {
// ...
}
You can work with the API or choose to do local flag evaluation to evaluate millions of flags per second. The SDK also supports live configuration updates.
Written in Typescript
Types are automatically pulled from the API and are available in your IDE. Nor more guessing what the return type of a flag is, all typos are picked-up by your IDE and CI build process.
