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

@deployramp/sdk

v0.1.25

Published

DeployRamp SDK - Feature flag management

Readme

@deployramp/sdk

npm version npm downloads License: MIT

TypeScript/JavaScript SDK for DeployRamp — AI-native feature flag management with gradual rollouts, real-time updates, and automatic error-monitored rollbacks.

Installation

npm install @deployramp/sdk
# or
yarn add @deployramp/sdk
# or
pnpm add @deployramp/sdk

Quick Start

import { init, flag, report, close } from "@deployramp/sdk";

// Initialize once at app startup
init({
  publicToken: "drp_pub_your_token",
  traits: { plan: "pro", region: "us-east" },
});

// Evaluate a feature flag
if (flag("new-checkout-flow")) {
  // show new checkout
} else {
  // show old checkout
}

// Report errors — DeployRamp uses these to auto-roll back bad deploys
try {
  await processCheckout();
} catch (err) {
  report(err, "new-checkout-flow");
}

close(); // flush events and disconnect

React

import { useFlag, useMeasure } from "@deployramp/sdk/react";

function CheckoutButton() {
  const newFlow = useFlag("new-checkout-flow");
  // Re-renders automatically when flag values change via WebSocket

  return newFlow ? <NewCheckout /> : <OldCheckout />;
}

function DataTable() {
  // Measures execution time of each branch and reports to DeployRamp
  const rows = useMeasure(
    "fast-query",
    () => fetchOptimizedRows(),
    () => fetchRows(),
  );
  return <Table rows={rows} />;
}

Measure Performance

Track how each flag branch performs across your user population:

import { measure, measureAsync } from "@deployramp/sdk";

// Synchronous
const result = measure(
  "fast-algorithm",
  () => newAlgorithm(data),
  () => oldAlgorithm(data),
);

// Asynchronous
const result = await measureAsync(
  "fast-query",
  () => optimizedQuery(),
  () => baselineQuery(),
);

Trait-Based Targeting

import { init, flag, setTraits } from "@deployramp/sdk";

init({ publicToken: "drp_pub_your_token" });

// Set traits once after login
setTraits({ plan: "enterprise", cohort: "beta" });

// Override traits for a single evaluation
const enabled = flag("beta-feature", { cohort: "alpha" });

API Reference

| Function | Description | |---|---| | init(config) | Initialize the SDK, fetch flags, open WebSocket for real-time updates | | flag(name, traitOverrides?) | Evaluate a feature flag; returns boolean | | setTraits(traits) | Update user traits used for all subsequent evaluations | | measure(name, enabledFn, disabledFn, traitOverrides?) | Run the appropriate branch and record timing | | measureAsync(name, enabledFn, disabledFn, traitOverrides?) | Async version of measure | | report(error, flagName?, traitOverrides?) | Report an error; triggers rollback monitoring | | subscribe(listener) | Listen for flag changes; returns unsubscribe function | | displayFeedback(flagName, prompt) | Show the in-app feedback widget for a flag | | close() | Flush pending events and disconnect |

React Hooks (@deployramp/sdk/react)

| Hook | Description | |---|---| | useFlag(name, traitOverrides?) | Evaluate a flag; re-renders on real-time updates | | useMeasure(name, enabledFn, disabledFn, traitOverrides?) | Measure branch performance in a component |

SdkConfig

interface SdkConfig {
  publicToken: string;       // Required. Your public token from deployramp.com
  baseUrl?: string;          // Defaults to https://flags.deployramp.com
  traits?: Record<string, string>;
  feedback?: {
    accentColor?: string;
    textColor?: string;
    backgroundColor?: string;
    position?: "bottom-right" | "bottom-left" | "top-right" | "top-left";
  };
}

Links

License

MIT