Skip to content

Tggl/js-tggl-client

Repository files navigation

Tggl Logo

Tggl Typescript SDK

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

GitHub Workflow Status (with event) Coveralls branch npm

Usage

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)) {
  // ...
}