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

@oai-statsig/serverless-client

v4.0.0

Published

Statsig helps you move faster with feature gates (feature flags), and/or dynamic configs. It also allows you to run A/B/n tests to validate your new features and understand their impact on your KPIs. If you're new to Statsig, check out our product and cre

Readme

Statsig helps you move faster with feature gates (feature flags), and/or dynamic configs. It also allows you to run A/B/n tests to validate your new features and understand their impact on your KPIs. If you're new to Statsig, check out our product and create an account at statsig.com.

Getting Started

Read through the Documentation or check out the Samples.

Packages

Clients

Product Bundles

Framework Specific Bindings

On-device and serverless DCS v2 migration

Version 4.0.0 is a breaking release for on-device and serverless clients. Upgrade any directly installed @oai-statsig/* packages together to the same version.

On-device and serverless clients require full JSON DCS v2 snapshots. The default download endpoint is https://statsigcdn.openai.com/v2/download_config_specs; there is no v1/v2 version option. Explicit URLs, API overrides, and fallback URLs are preserved and must return v2. SDK keys are sent in the DCS request header.

Before upgrading, publish v2 data to the KV key, Edge Config item, or bootstrap source selected by each application. The SDK does not choose an edge storage key. V1 network, bootstrap, custom-adapter, and stored payloads are unsupported. Inputs use the existing lightweight JSON parsing without full schema validation. Keep v1 edge values available for older SDK consumers during the rollout.

The default adapter stores the original v2 JSON under a separate specs-v2 cache namespace. Existing v1 caches are ignored; the first initialization needs v2 bootstrap data or a successful fetch. getContext().values now exposes the v2 maps and condition references and can be passed back as v2 bootstrap data. DownloadConfigSpecsResponse now describes that v2 wire format. The evaluator uses the name-keyed spec maps, shared condition references, and numeric membership records directly without expanding or rewriting the snapshot. Initialization without any usable snapshot reports success: false and source NoValues.

initializeFromKV and initializeViaURL keep their selected source for later async updates, prefetches, and any explicitly enabled background cache refreshes. An empty or failed read does not switch to the Statsig CDN. Caller-provided adapters retain control of their own refresh behavior.

For a direct on-device integration with Vercel Edge Config, configure the source on the adapter before initializing the client:

const dataAdapter = new StatsigSpecsDataAdapter();
dataAdapter.setDataSource(async () => {
  const specs = await edgeConfigClient.get(edgeConfigItemKey);
  return specs == null ? null : JSON.stringify(specs);
});
const client = new StatsigOnDeviceEvalClient(sdkKey, { dataAdapter });
await client.initializeAsync();
// Subsequent updateAsync() calls read the same Edge Config item.

Community

If you need any assistance or just have a question, feel free to reach out to us on Slack.