The Typescript SDK can be used both on the client and server to evaluate flags and report usage to the Tggl API or a proxy.
🔗 Website • 📚 Documentation • 📦 NPM • 🎥 Videos
Install the dependency:
npm i tggl-client
Start evaluating flags:
import { TgglClient } from 'tggl-client'
const flags = await client.evalContext({
userId: 'foo',
email: 'foo@gmail.com',
country: 'FR',
// ...
})
if (flags.get('my-feature', true)) {
// ...
}