@flagship.io/openfeature-provider-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.0 • Public • Published

AB Tasty OpenFeature Provider for NodeJS

[!WARNING] This is a beta version, it may still contain some bugs and imperfections and should not be considered ready for production.

Overview

This Provider allow the use of OpenFeature with Flagship, the platform to run experiments across all channels and devices and let the teams continuously optimize their product without risk in order to build better experiences and unlock new revenue opportunities.

Getting started

Below is a simple example that describes the instantiation of the AB Tasty Provider. Please see the OpenFeature Documentation for details on how to use the OpenFeature SDK.

Add the AB Tasty provider

npm install @flagship-io/openfeature-provider-js

Confirm peer dependencies are installed

npm install @openfeature/server-sdk

Register the AB Tasty provider with OpenFeature

const { ABTastyProvider } = require("@flagship.io/openfeature-provider-js");
const { OpenFeature } = require("@openfeature/server-sdk");
const provider = new ABTastyProvider("<ENV_ID>", "<API_KEY>");
await OpenFeature.setProviderAndWait(provider);

Use of OpenFeature with AB Tasty

After the initial setup you can use OpenFeature according to their documentation.

⚠️ The AB Tasty Provider requires a targeting key to be set. Often times this should be set when evaluating the value of a flag by setting an EvaluationContext which contains the targeting key.

An example flag evaluation

const client = openFeature.getClient();

const context: EvaluationContext = {
  targetingKey: "TARGETING_KEY",
};
const boolValue = await client.getBooleanValue("boolFlag", false, context);

Contributing

Please read our contributing guide.

License

Licensed under the Apache License, Version 2.0. See: Apache License.

About Feature Experimentation

drawingFlagship by AB Tasty is a feature flagging platform for modern engineering and product teams. It eliminates the risks of future releases by separating code deployments from these releases 💡 With Flagship, you have full control over the release process. You can: ​

  • Switch features on or off through remote config.
  • Automatically roll-out your features gradually to monitor performance and gather feedback from your most relevant users.
  • Roll back any feature should any issues arise while testing in production.
  • Segment users by granting access to a feature based on certain user attributes.
  • Carry out A/B tests by easily assigning feature variations to groups of users. ​ drawing ​ Flagship also allows you to choose whatever implementation method works for you from our many available SDKs or directly through a REST API. Additionally, our architecture is based on multi-cloud providers that offer high performance and highly-scalable managed services. ​ To learn more:
  • Solution overview - A 5mn video demo 🎥
  • Website Documentation - Our dev portal with guides, how tos, API and SDK references
  • Command Documentation - Command references
  • Sign up for a free trial - Create your free account
  • Guide to feature flagging - Everything you need to know about feature flag related use cases
  • Blog - Additional resources about release management

Readme

Keywords

none

Package Sidebar

Install

npm i @flagship.io/openfeature-provider-js

Weekly Downloads

1

Version

1.0.0-beta.0

License

ISC

Unpacked Size

38.7 kB

Total Files

23

Last publish

Collaborators

  • adel-abtasty
  • raf-abtasty
  • chadi-abtasty