Skip to content

Commit

Permalink
Update openfeature_javascript.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspoignant authored Aug 10, 2023
1 parent f3a93de commit 6b2d6d3
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
sidebar_position: 51
title: Javascript / Typescript
title: Node.js
description: How to use the OpenFeature Javascript SDK
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';



# Javascript / Typescript SDK usage
# Node.js

## Install dependencies

Expand All @@ -33,7 +33,7 @@ npm i @openfeature/js-sdk @openfeature/go-feature-flag-provider

## Initialize your Open Feature client

To evaluate the flags you need to have an Open Feature configured in you app.
To evaluate the flags you need to have an Open Feature configured in your app.
This code block shows you how you can create a client that you can use in your application.

<Tabs groupId="code">
Expand Down Expand Up @@ -74,10 +74,10 @@ const featureFlagClient = OpenFeature.getClient('my-app');

## Evaluate your flag

This code block explain how you can create an `EvaluationContext` and use it to evaluate your flag.
This code block explains how you can create an `EvaluationContext` and use it to evaluate your flag.

:::note
In this example we are evaluating a `boolean` flag, but other types are available.
In this example, we are evaluating a `boolean` flag, but other types are available.

**Refer to the [Open Feature documentation](https://docs.openfeature.dev/docs/reference/concepts/evaluation-api#basic-evaluation) to know more about it.**
:::
Expand Down Expand Up @@ -133,4 +133,4 @@ if (adminFlag) {
</Tabs>

## Contribute to the provider
You can find the source of the provider in the [`open-feature/js-sdk-contrib`](https://github.com/open-feature/js-sdk-contrib/tree/main/libs/providers/go-feature-flag) repository.
You can find the source of the provider in the [`open-feature/js-sdk-contrib`](https://github.com/open-feature/js-sdk-contrib/tree/main/libs/providers/go-feature-flag) repository.

0 comments on commit 6b2d6d3

Please sign in to comment.