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

@buzzr/dfs-react

v5.0.0

Published

Framework-agnostic display helpers for rendering @buzzr/dfs-engine settlements — turns DfsSettlementResult into a clean view-model for React, Vue, Svelte, or plain HTML.

Downloads

52

Readme

@buzzr/dfs-react

npm version npm downloads CI types license

Turn a raw settlement result into a render-ready view-model in one call. @buzzr/dfs-engine is headless — it hands you a DfsSettlementResult with no opinion on display. This package projects that result into pre-formatted labels, currency strings, and status tones your UI can map straight to markup — in React, Vue, Svelte, or vanilla HTML.

Despite the name, this package has zero React runtime dependency. The name signals its primary consumer audience; the code is pure TypeScript formatting functions.

Install

npm install @buzzr/dfs-react @buzzr/dfs-engine

30-second quick start

import { getSlipDisplayModel } from '@buzzr/dfs-react';
import type { DfsSettlementResult } from '@buzzr/dfs-engine';

function SlipCard({ result }: { result: DfsSettlementResult }) {
  const model = getSlipDisplayModel(result);
  // model.statusLabel  -> "won"
  // model.tone         -> "win"        (win | loss | push | pending | void)
  // model.multiplierLabel -> "3.00x"
  // model.payoutLabel  -> "$30.00"
  // model.stakeLabel   -> "$10.00"
  return (
    <div data-tone={model.tone}>
      <header>
        {model.statusLabel} · {model.multiplierLabel} · {model.payoutLabel}
      </header>
      <ul>
        {model.legs.map((leg) => (
          <li key={leg.legId} data-tone={leg.tone}>
            {leg.label} {leg.line}
            {leg.actual !== null && <span> · actual {leg.actual}</span>}
            {leg.pendingReason && <span> · {leg.pendingReason}</span>}
          </li>
        ))}
      </ul>
    </div>
  );
}

Each leg comes back as "Jayson Tatum — Points" (label) with an "o26.5" / "u26.5" line (line), its outcome status, a display tone, and the actual stat value if graded.

API

| Export | Purpose | | ----------------------- | -------------------------------------------------------------------------- | | getSlipDisplayModel() | Project a DfsSettlementResult into a SlipDisplayModel | | getStatusTone() | Map an engine status string to a SlipStatusTone | | formatLegLabel() | Render "{Player} — {PropType}" | | formatLegLine() | Render "o26.5" / "u26.5" | | SlipDisplayModel | Type: slip-level labels, tone, and formatted stake/payout/multiplier | | LegDisplayModel | Type: per-leg label, line, status, tone, actual value, and pending reason | | SlipStatusTone | Type: 'win' \| 'loss' \| 'push' \| 'pending' \| 'void' |

When to use this vs siblings

| You want to… | Reach for | | ------------------------------------------------ | ------------------------------------------------------------------------ | | Format settlement results for any UI layer | this package | | Produce the settlement results in the first place | @buzzr/dfs-engine | | Grade entries from the command line | @buzzr/dfs-cli | | Build settlement fixtures for tests | @buzzr/dfs-testkit |

Links

License

MIT