npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@bucketeer/openfeature-js-client-sdk

v0.0.3

Published

This is the official JS OpenFeature provider for accessing your feature flags with [Bucketeer](https://bucketeer.io/).

Readme

Bucketeer - OpenFeature JS provider for a web clients

This is the official JS OpenFeature provider for accessing your feature flags with Bucketeer.

Bucketeer is an open-source platform created by CyberAgent to help teams make better decisions, reduce deployment lead time and release risk through feature flags. Bucketeer offers advanced features like dark launches and staged rollouts that perform limited releases based on user attributes, devices, and other segments.

In conjunction with the OpenFeature SDK you will be able to evaluate your feature flags in your web applications.

[!WARNING] This is a beta version. Breaking changes may be introduced before general release.

For documentation related to flags management in Bucketeer, refer to the Bucketeer documentation website.

Installation

npm install @bucketeer/openfeature-js-client-sdk

This will automatically install the required peer dependencies: @openfeature/web-sdk and @bucketeer/js-client-sdk.

Usage

Initialize the provider

Bucketeer provider needs to be created and then set in the global OpenFeatureAPI.

import { OpenFeature } from '@openfeature/web-sdk';
import { defineBKTConfig } from '@bucketeer/js-client-sdk'
import { BucketeerProvider } from '@bucketeer/openfeature-js-client-sdk';

const config = defineBKTConfig({
  apiEndpoint: 'BUCKETEER_API_ENDPOINT',
  apiKey: 'BUCKETEER_API_KEY',
  featureTag: 'FEATURE_TAG',
  appVersion: '1.2.3',
  fetch: window.fetch,
})

const initEvaluationContext = {
  targetingKey: 'USER_ID',
  app_version: '1.2.3',
}
await OpenFeature.setContext(initEvaluationContext)
await OpenFeature.setProviderAndWait(new BucketeerProvider(config))

See our documentation for more SDK configuration.

The evaluation context allows the client to specify contextual data that Bucketeer uses to evaluate the feature flags.

The targetingKey is the user ID (Unique ID) and cannot be empty.

Update the Evaluation Context

You can update the evaluation context with the new attributes if the user attributes change.

const newEvaluationContext = {
  targetingKey: 'USER_ID',
  app_version: '2.0.0',
  age: 25,
  country: 'US',
}
await OpenFeature.setContext(newEvaluationContext)

[!WARNING] Changing the targetingKey is not supported in the current implementation of the BucketeerProvider.

To change the user ID, the BucketeerProvider must be removed and reinitialized.

await OpenFeature.clearProviders()
await OpenFeature.clearContext()

// Reinitialize the provider with new targetingKey
const newEvaluationContext = {
  targetingKey: 'USER_ID_NEW',
  app_version: '2.0.0',
  age: 25,
  country: 'US',
}

const config = defineBKTConfig({
  apiEndpoint: 'BUCKETEER_API_ENDPOINT',
  apiKey: 'BUCKETEER_API_KEY',
  featureTag: 'FEATURE_TAG',
  appVersion: '1.2.3',
  fetch: window.fetch,
})

await OpenFeature.setContext(newEvaluationContext)
await OpenFeature.setProviderAndWait(new BucketeerProvider(config))

Evaluate a feature flag

After the provider is set and the provider's status is ClientProviderEvents.Ready, you can evaluate a feature flag using OpenFeatureAPI.

const client = OpenFeature.getClient();

// boolean flag
const flagValue = client.getBooleanValue('my-feature-flag', false);

// string flag
const flagValue = client.getStringValue('my-feature-flag', 'default-value');

// number flag
const flagValue = client.getNumberValue('my-feature-flag', 0);

// object flag
const flagValue = client.getObjectValue('my-feature-flag', {});

Contributing

We would ❤️ for you to contribute to Bucketeer and help improve it! Anyone can use and enjoy it!

Please follow our contribution guide here.

Development

Environment

  • pnpm
    • enable it via corepack enable
  • Node.js
    • check ./.node-version

You need .env file to provide api secrets. Just copy env.template and rename it to .env, then update it with your secrets.

License

Apache License 2.0, see LICENSE.