Skip to content

flipt-sdk 0.0.6

Install from the command line:
Learn more about npm packages
$ npm install @betrybe/flipt-sdk@0.0.6
Install via package.json:
"@betrybe/flipt-sdk": "0.0.6"

About this version

@betrybe/flipt-sdk

The @betrybe/flipt-sdk package is a JavaScript client for Flipt servers, with it you can evaluate if Feature Flags are enabled or not using queries.

Installing

In order to install @betrybe/flipt-sdk you'll have to follow these couple of steps:

  1. Add the @betrybe registry to the .npmrc file for the Github Packages.
@betrybe:registry=https://npm.pkg.github.com/
  1. Install the package using your package manager
npm i @betrybe/flipt-react # if you're using npm
yarn @betrybe/flipt-react # if you're using yarn
pnpm add @betrybe/flipt-react # if you're using pnpm

After following these steps, you should be able to use the @betrybe/flipt-sdk library.

API

  • createFliptSDK
createFliptSDK(config: FliptConfig): FlipSDKInstance;

The function that will instantiate the Flipt client, providing the methods to communicate with the Flipt server.

Métodos

  • evaluate
evaluate(flagKey: string, entityId: string, context: Context, options: RequestOptions): Promise<Evalutation<Context>>;

Evaluates only one feature flag.

  • batchEvaluate
batchEvaluate(requests: Request[], options: RequestOptions): Promise<BatchEvalutationResponse<Context>>;

Evaluates many feature flags with a single query.

Contributing

To contribute to the project you can solve the issues created by us or other people in our repository through PRs. Feel free to contribute however you want, all contributions are heartly welcomed :)

To run the project locally, you'll have to install pnpm. For that you can follow the steps in its official documentation.

With that being done, you'll just have to install the project's dependencies and run the package's build script.

pnpm i
pnpm run build --filter @betrybe/flipt-sdk

Details


Assets

  • flipt-sdk-0.0.6-npm.tgz

Download activity

  • Total downloads 428
  • Last 30 days 0
  • Last week 0
  • Today 0