openfeature-web-tggl-provider
v1.1.1
Published
Tggl Typescript Web OpenFeature Provider
Downloads
23
Maintainers
Readme
Usage
Install the dependencies:
npm i @openfeature/web-sdk openfeature-web-tggl-provider
Start evaluating flags:
import { OpenFeature } from '@openfeature/web-sdk';
import { TgglWebProvider } from 'openfeature-web-tggl-provider'
await OpenFeature.setProviderAndWait(new TgglWebProvider('API_KEY'))
const client = OpenFeature.getClient();
const value = client.getBooleanValue(
'my-feature',
false
)
if (value) {
console.log('Feature is enabled')
}