Skip to content

Commit 652c05a

Browse files
committed
update sample code
1 parent 46b62f1 commit 652c05a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/assets/blog/open-feature-api-demo.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ import { OpenFeature, InMemoryProvider } from '@openfeature/web-sdk';
6060
const FLAG_CONFIGURATION = {
6161
'todo-list': {
6262
variants: {
63-
enabled: true, // 開啟 Todo List 功能
64-
disabled: false, // 關閉 Todo List 功能
63+
on: true, // 開啟 Todo List 功能
64+
off: false, // 關閉 Todo List 功能
6565
},
6666
disabled: false,
6767
defaultVariant: 'enabled',
@@ -73,9 +73,9 @@ import { OpenFeature, InMemoryProvider } from '@openfeature/web-sdk';
7373
OpenFeature.setProvider(featureFlagProvider);
7474
```
7575

76-
以上程式碼中,我們以 `todo-list` 為 Flag Key 作為 Feature Flag 設定,並指定了 `enabled``disabled` 兩種 **variants**
76+
以上程式碼中,我們以 `todo-list` 為 Flag Key 作為 Feature Flag 設定,並指定了 `on``off` 兩種 **variants**
7777

78-
透過 `defaultVariant` 指定為 `enabled`,代表以目前的設定 `todo-list` 功能是打開的。
78+
透過 `defaultVariant` 指定為 `on`,代表以目前的設定 `todo-list` 功能是打開的。
7979

8080
## 利用 Feature Flag 控制 Todo List 功能
8181

0 commit comments

Comments
 (0)