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 🙏

© 2026 – Pkg Stats / Ryan Hefner

configdn-openfeature-provider

v0.1.0

Published

OpenFeature provider for ConfigDN

Readme

ConfigDN OpenFeature Provider

An OpenFeature provider for the ConfigDN JavaScript client. The package supports both OpenFeature's client-side Web SDK and its server SDK through separate entry points.

Installation

Install the provider, ConfigDN client, and the OpenFeature SDK for the runtime you are using.

Browser, React, and other client-side applications:

npm install configdn-openfeature-provider @openfeature/web-sdk configdn-js

Node.js and other server-style applications:

npm install configdn-openfeature-provider @openfeature/server-sdk configdn-js

Browser And React

Use ConfigDNProvider with @openfeature/web-sdk. The root import, /web, and /browser imports are equivalent.

import { OpenFeature } from "@openfeature/web-sdk";
import { ConfigDNProvider } from "configdn-openfeature-provider";

const provider = new ConfigDNProvider("YOUR_CONFIGDN_AUTH_KEY");
await OpenFeature.setProviderAndWait(provider);

const client = OpenFeature.getClient();
const enabled = await client.getBooleanValue("new-checkout", false);
const title = await client.getStringValue("checkout-title", "Checkout");

The Web SDK provider resolves synchronously from the ConfigDN client cache. setProviderAndWait should be used so the initial ConfigDN refresh completes before the application evaluates flags.

Node.js And Server Runtimes

Use ConfigDNServerProvider with @openfeature/server-sdk. The /node and /server imports are equivalent.

import { OpenFeature } from "@openfeature/server-sdk";
import { ConfigDNServerProvider } from "configdn-openfeature-provider/node";

const provider = new ConfigDNServerProvider("YOUR_CONFIGDN_AUTH_KEY");
await OpenFeature.setProviderAndWait(provider);

const client = OpenFeature.getClient();
const enabled = await client.getBooleanValue("new-checkout", false);

The server provider implements the asynchronous OpenFeature provider contract, but evaluations still use the already-loaded ConfigDN cache rather than making a network request for every evaluation.

Configuration

The constructor accepts the ConfigDN authorization key and optional client settings:

const provider = new ConfigDNProvider("YOUR_CONFIGDN_AUTH_KEY", {
  endpoint: "https://your-configdn-server.example/",
  refreshInterval: 60
});

endpoint defaults to https://cdn.configdn.com/. refreshInterval is measured in seconds and defaults to 60.

Supported Values

The provider supports OpenFeature:

  • Boolean values with getBooleanValue.
  • String values with getStringValue.
  • Number values with getNumberValue.
  • JSON object and array values with getObjectValue.

The default value must have the same type as the ConfigDN value. Missing keys, transport failures, and type mismatches return the supplied default value and include an OpenFeature error reason.

Entry Points

| Runtime | Import | Provider | | --- | --- | --- | | Browser, React | configdn-openfeature-provider | ConfigDNProvider | | Browser | configdn-openfeature-provider/browser | ConfigDNProvider | | Bun | configdn-openfeature-provider/bun | ConfigDNServerProvider | | Node.js | configdn-openfeature-provider/node | ConfigDNServerProvider | | Server-style runtimes | configdn-openfeature-provider/server | ConfigDNServerProvider | | Deno | configdn-openfeature-provider/deno | ConfigDNServerProvider | | Cloudflare Workers | configdn-openfeature-provider/cloudflare-worker | ConfigDNServerProvider | | Chromium extensions | configdn-openfeature-provider/chromium-extension | ConfigDNProvider |

Each entry point is available as CommonJS and ESM and includes TypeScript declarations.

Lifecycle And Context

Call provider.shutdown() when the provider is no longer needed. This stops ConfigDN's refresh timer and aborts an active request.

ConfigDN currently stores and evaluates values without an OpenFeature user context. The context arguments are accepted to satisfy the provider contract but are not used for targeting.

The host runtime must provide fetch and AbortController. The provider does not bundle a fetch polyfill.