FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Support targeting context accessor by zhiyuanliang-ms · Pull Request #93 · microsoft/FeatureManagement-JavaScript · GitHub

Support targeting context accessor - #93

Merged
Zhiyuan Liang (zhiyuanliang-ms) merged 11 commits into
previewfrom
zhiyuanliang/targeting-context-accessor
Mar 26, 2025
Merged

Support targeting context accessor#93
Zhiyuan Liang (zhiyuanliang-ms) merged 11 commits into
previewfrom
zhiyuanliang/targeting-context-accessor

Conversation

Zhiyuan Liang (zhiyuanliang-ms) commented Feb 6, 2025
edited
Loading

Copy link
Copy Markdown
Member

Why this PR?

#55

Support targeting context accessor pattern, align with other FM libraries

Usage

An example application can be found #105

const featureManager = new FeatureManager(provider, {targetingContextAccessor: () => ({ userId: "xxx", groups: [] }) });

If targeting context is explicitly provided within isEnabled or getVariant call, it will have the higher priority than the targeting context accessor. See the testcases and comment

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • src/feature-management/package-lock.json: Language not supported
  • src/feature-management/src/filter/TargetingFilter.ts: Evaluated as low risk

Copy link
Copy Markdown
Member Author

Example are added in #105

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL