Skip to content

Commit f919243

Browse files
update readme (#102)
1 parent 00794c6 commit f919243

File tree

4 files changed

+36
-16
lines changed

4 files changed

+36
-16
lines changed

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,29 @@
22

33
[![feature-management](https://img.shields.io/npm/v/@microsoft/feature-management?label=@microsoft/feature-management)](https://www.npmjs.com/package/@microsoft/feature-management)
44

5-
Feature Management is a library for enabling/disabling features at runtime.
6-
Developers can use feature flags in simple use cases like conditional statement to more advanced scenarios like conditionally adding routes.
5+
Feature management provides a way to develop and expose application functionality based on features. Many applications have special requirements when a new feature is developed such as when the feature should be enabled and under what conditions. This library provides a way to define these relationships, and also integrates into common .NET code patterns to make exposing these features possible.
76

87
## Getting Started
98

10-
### Prerequisites
9+
[Azure App Configuration Quickstart](https://learn.microsoft.com/azure/azure-app-configuration/quickstart-feature-flag-javascript): A quickstart guide about how to integrate feature flags from Azure App Configuration into your JavaScript applications.
1110

12-
- Node.js LTS version
11+
[Feature Overview](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-overview#feature-development-status): This document provides a feature status overview.
12+
13+
[Feature Reference](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference): This document provides a full feature rundown.
1314

1415
### Usage
1516

16-
You can use feature flags from the Azure App Configuration service, local files or any other sources.
17+
You can use feature flags from the Azure App Configuration service, local files or any other sources. For more information, please go to [Feature flag configuration](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference#feature-flag-configuration).
1718

1819
#### Use feature flags from Azure App Configuration
1920

2021
The App Configuration JavaScript provider provides feature flags in as a `Map` object.
2122
A builtin `ConfigurationMapFeatureFlagProvider` helps to load feature flags in this case.
2223

2324
```js
24-
const appConfig = await load(connectionString, {featureFlagOptions}); // load feature flags from Azure App Configuration service
25+
import { load } from "@azure/app-configuration-provider";
26+
import { FeatureManager, ConfigurationMapFeatureFlagProvider } from "@microsoft/feature-management";
27+
const appConfig = await load("<CONNECTION-STRING>", {featureFlagOptions}); // load feature flags from Azure App Configuration service
2528
const featureProvider = new ConfigurationMapFeatureFlagProvider(appConfig);
2629
const featureManager = new FeatureManager(featureProvider);
2730
const isAlphaEnabled = await featureManager.isEnabled("Alpha");
@@ -54,13 +57,18 @@ Content of `sample.json`:
5457

5558
Load feature flags from `sample.json` file.
5659
```js
60+
import { FeatureManager, ConfigurationObjectFeatureFlagProvider } from "@microsoft/feature-management";
5761
const config = JSON.parse(await fs.readFile("path/to/sample.json"));
5862
const featureProvider = new ConfigurationObjectFeatureFlagProvider(config);
5963
const featureManager = new FeatureManager(featureProvider);
6064
const isAlphaEnabled = await featureManager.isEnabled("Alpha");
6165
console.log("Feature Alpha is:", isAlphaEnabled);
6266
```
6367

68+
## Examples
69+
70+
See code snippets under [examples/](./examples/) folder.
71+
6472
## Contributing
6573

6674
This project welcomes contributions and suggestions. Most contributions require you to agree to a

src/feature-management-applicationinsights-browser/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Microsoft Feature Management Application Insights Plugin for Browser
22

3-
Feature Management Application Insights Plugin for Browser provides a solution for sending feature flag evaluation events produced by the Feature Management library.
3+
Feature Management Application Insights Plugin for Browser provides a solution for sending feature flag evaluation telemetry produced by the [`@microsoft/feature-management`](https://www.npmjs.com/package/@microsoft/feature-management) library.
44

55
## Getting Started
66

7+
For more information, please go to [Feature reference](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference#application-insights-integration).
8+
79
### Usage
810

911
``` javascript

src/feature-management-applicationinsights-node/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Microsoft Feature Management Application Insights Plugin for Node
22

3-
Feature Management Application Insights Plugin for Node provides a solution for sending feature flag evaluation events produced by the Feature Management library.
3+
Feature Management Application Insights Plugin for Node provides a solution for sending feature flag evaluation telemetry produced by the [`@microsoft/feature-management`](https://www.npmjs.com/package/@microsoft/feature-management) library.
44

55
## Getting Started
66

7+
For more information, please go to [Feature reference](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference#application-insights-integration).
8+
79
### Prerequisites
810

911
- Node.js LTS version
10-
- `applicationinsights` SDK v2(classic)
12+
- `applicationinsights` SDK 2.x (classic)
1113

1214
### Usage
1315

src/feature-management/README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,29 @@
22

33
[![feature-management](https://img.shields.io/npm/v/@microsoft/feature-management?label=@microsoft/feature-management)](https://www.npmjs.com/package/@microsoft/feature-management)
44

5-
Feature Management is a library for enabling/disabling features at runtime.
6-
Developers can use feature flags in simple use cases like conditional statement to more advanced scenarios like conditionally adding routes.
5+
Feature management provides a way to develop and expose application functionality based on features. Many applications have special requirements when a new feature is developed such as when the feature should be enabled and under what conditions. This library provides a way to define these relationships, and also integrates into common .NET code patterns to make exposing these features possible.
76

87
## Getting Started
98

10-
### Prerequisites
9+
[Azure App Configuration Quickstart](https://learn.microsoft.com/azure/azure-app-configuration/quickstart-feature-flag-javascript): A quickstart guide about how to integrate feature flags from Azure App Configuration into your JavaScript applications.
1110

12-
- Node.js LTS version
11+
[Feature Overview](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-overview#feature-development-status): This document provides a feature status overview.
12+
13+
[Feature Reference](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference): This document provides a full feature rundown.
1314

1415
### Usage
1516

16-
You can use feature flags from the Azure App Configuration service, local files or any other sources.
17+
You can use feature flags from the Azure App Configuration service, local files or any other sources. For more information, please go to [Feature flag configuration](https://learn.microsoft.com/azure/azure-app-configuration/feature-management-javascript-reference#feature-flag-configuration).
1718

1819
#### Use feature flags from Azure App Configuration
1920

2021
The App Configuration JavaScript provider provides feature flags in as a `Map` object.
2122
A builtin `ConfigurationMapFeatureFlagProvider` helps to load feature flags in this case.
2223

2324
```js
24-
const appConfig = load(connectionString, {featureFlagOptions}); // load feature flags from Azure App Configuration service
25+
import { load } from "@azure/app-configuration-provider";
26+
import { FeatureManager, ConfigurationMapFeatureFlagProvider } from "@microsoft/feature-management";
27+
const appConfig = await load("<CONNECTION-STRING>", {featureFlagOptions}); // load feature flags from Azure App Configuration service
2528
const featureProvider = new ConfigurationMapFeatureFlagProvider(appConfig);
2629
const featureManager = new FeatureManager(featureProvider);
2730
const isAlphaEnabled = await featureManager.isEnabled("Alpha");
@@ -42,7 +45,7 @@ Content of `sample.json`:
4245
{
4346
"id": "Alpha",
4447
"description": "",
45-
"enabled": "true",
48+
"enabled": true,
4649
"conditions": {
4750
"client_filters": []
4851
}
@@ -54,13 +57,18 @@ Content of `sample.json`:
5457

5558
Load feature flags from `sample.json` file.
5659
```js
60+
import { FeatureManager, ConfigurationObjectFeatureFlagProvider } from "@microsoft/feature-management";
5761
const config = JSON.parse(await fs.readFile("path/to/sample.json"));
5862
const featureProvider = new ConfigurationObjectFeatureFlagProvider(config);
5963
const featureManager = new FeatureManager(featureProvider);
6064
const isAlphaEnabled = await featureManager.isEnabled("Alpha");
6165
console.log("Feature Alpha is:", isAlphaEnabled);
6266
```
6367

68+
## Examples
69+
70+
See code snippets under [examples/](./examples/) folder.
71+
6472
## Contributing
6573

6674
This project welcomes contributions and suggestions. Most contributions require you to agree to a

0 commit comments

Comments
 (0)