You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most functions were implemented using async operations. Here it is a differnet way to execute the criteria:
109
-
110
-
```js
111
-
switcher.isItOn('KEY')
112
-
.then(result=>console.log('Result:', result))
113
-
.catch(error=>console.log(error));
114
-
```
115
-
116
-
3.**Strategy validation - preparing input**
109
+
2.**Strategy validation - preparing input**
117
110
Loading information into the switcher can be made by using *prepare*, in case you want to include input from a different place of your code. Otherwise, it is also possible to include everything in the same call.
Forcing Switchers to resolve remotely can help you define exclusive features that cannot be resolved locally.
155
150
This feature is ideal if you want to run the SDK in local mode but still want to resolve a specific switcher remotely.
151
+
152
+
A particular use case is when a swithcer has a Relay Strategy that requires a remote call to resolve the value.
153
+
156
154
```js
157
155
constswitcher=Client.getSwitcher();
158
156
awaitswitcher.remote().isItOn('FEATURE01');
159
157
```
160
158
161
-
## Built-in mock feature
162
-
You can also bypass your switcher configuration by invoking 'Client.assume'. This is perfect for your test code where you want to validate both scenarios when the switcher is true and false.
159
+
## Built-in stub feature
160
+
You can also bypass your switcher configuration with 'Client.assume' API. This is perfect for your test code where you want to validate both scenarios when the switcher is true and false.
0 commit comments