Skip to content

Commit 1d25709

Browse files
update feature filter doc
1 parent 58b0035 commit 1d25709

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

articles/azure-app-configuration/feature-management-javascript-reference.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: azure-app-configuration
99
ms.devlang: javascript
1010
ms.custom: devx-track-javascript
1111
ms.topic: tutorial
12-
ms.date: 01/20/2025
12+
ms.date: 04/06/2025
1313
zone_pivot_groups: feature-management
1414
#Customer intent: I want to control feature availability in my app by using the Feature Management library.
1515
---
@@ -125,7 +125,7 @@ import { load } from "@azure/app-configuration-provider";
125125
import { ConfigurationMapFeatureFlagProvider, FeatureManager } from "@microsoft/feature-management";
126126
const appConfig = await load("YOUR_APP-CONFIG-ENDPOINT",
127127
new DefaultAzureCredential(), // For more information: https://learn.microsoft.com/javascript/api/overview/azure/identity-readme
128-
{featureFlagOptions: { enabled: true }}); // load feature flags from Azure App Configuration service
128+
{ featureFlagOptions: { enabled: true } }); // load feature flags from Azure App Configuration service
129129
const featureProvider = new ConfigurationMapFeatureFlagProvider(appConfig);
130130
const featureManager = new FeatureManager(featureProvider);
131131
```
@@ -276,10 +276,14 @@ The following snippet demonstrates how to implement a customized feature filter
276276
}
277277
```
278278

279-
You need to register the custom filter when creating the `FeatureManager`.
279+
You need to register your custom filter under the `customFilters` property of the `FeatureManagerOptions` object passed to the `FeatureManager` constructor.
280280

281281
```typescript
282-
const featureManager = new FeatureManager(ffProvider, {customFilters: [new MyCriteriaFilter()]});
282+
const featureManager = new FeatureManager(ffProvider, {
283+
customFilters: [
284+
new MyCriteriaFilter() // add custom feature filters under FeatureManagerOptions.customFilters
285+
]
286+
});
283287
```
284288

285289
### Parameterized feature filters
@@ -307,7 +311,7 @@ The feature filter can take advantage of the context that is passed in when `isE
307311

308312
## Built-in feature filters
309313

310-
There are two feature filters that come with the `FeatureManagement` package: `TimeWindowFilter`, and `TargetingFilter`.
314+
There are two feature filters that come with the `FeatureManagement` package: `TimeWindowFilter` and `TargetingFilter`. All built-in feature filters will be added by default when constructing `FeatureManager`.
311315

312316
Each of the built-in feature filters has its own parameters. Here's the list of feature filters along with examples.
313317

0 commit comments

Comments
 (0)